forked from OERV-BSP/u-boot
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4609811251 |
@@ -38,6 +38,7 @@
|
||||
#include <linux/sizes.h>
|
||||
#include <linux/err.h>
|
||||
#include <asm/io.h>
|
||||
#include <clk.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
@@ -271,6 +272,10 @@ struct fsl_qspi {
|
||||
struct udevice *dev;
|
||||
void __iomem *iobase;
|
||||
void __iomem *ahb_addr;
|
||||
#if CONFIG_IS_ENABLED(CLK)
|
||||
struct clk clk_en;
|
||||
struct clk clk;
|
||||
#endif
|
||||
u32 memmap_phy;
|
||||
u32 memmap_size;
|
||||
const struct fsl_qspi_devtype_data *devtype_data;
|
||||
@@ -820,7 +825,21 @@ static int fsl_qspi_probe(struct udevice *bus)
|
||||
|
||||
dm_bus->max_hz = fdtdec_get_int(blob, node, "spi-max-frequency",
|
||||
66000000);
|
||||
#if CONFIG_IS_ENABLED(CLK)
|
||||
ret = clk_get_by_name(bus, "qspi_en", &q->clk_en);
|
||||
if (ret) {
|
||||
dev_err(bus, "cannot find qspi_en clock\n");
|
||||
return ret;
|
||||
}
|
||||
ret = clk_get_by_name(bus, "qspi", &q->clk);
|
||||
if (ret) {
|
||||
dev_err(bus, "cannot find qspi clock\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
clk_enable(&q->clk_en);
|
||||
clk_enable(&q->clk);
|
||||
#endif
|
||||
fsl_qspi_default_setup(q);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user