From 7c616862553e37c89ea5db399961018a7367ca33 Mon Sep 17 00:00:00 2001 From: Vignesh R Date: Wed, 6 Jul 2016 09:58:55 +0530 Subject: dm: core: implement dev_map_physmem() This API helps to map physical register addresss pace of device to virtual address space easily. Its just a wrapper around map_physmem() with MAP_NOCACHE flag. Signed-off-by: Vignesh R Suggested-by: Simon Glass Reviewed-by: Jagan Teki Reviewed-by: Simon Glass Signed-off-by: Jagan Teki --- include/dm/device.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') diff --git a/include/dm/device.h b/include/dm/device.h index f03bcd3b49..1bfcf3bcbc 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -466,6 +466,19 @@ fdt_addr_t dev_get_addr(struct udevice *dev); */ void *dev_get_addr_ptr(struct udevice *dev); +/** + * dev_map_physmem() - Read device address from reg property of the + * device node and map the address into CPU address + * space. + * + * @dev: Pointer to device + * @size: size of the memory to map + * + * @return mapped address, or NULL if the device does not have reg + * property. + */ +void *dev_map_physmem(struct udevice *dev, unsigned long size); + /** * dev_get_addr_index() - Get the indexed reg property of a device * -- cgit From 39832244231eab3629f412f1a679779316c6e3e8 Mon Sep 17 00:00:00 2001 From: Vignesh R Date: Wed, 6 Jul 2016 09:58:57 +0530 Subject: keystone2: spi: do not define DM_SPI and DM_SPI_FLASH for SPL build Since Keystone2 devices do not have support DM in SPL, do not define DM_SPI and DM_SPI_FLASH for SPL build. Signed-off-by: Vignesh R Reviewed-by: Tom Rini Reviewed-by: Jagan Teki --- include/configs/ti_armv7_keystone2.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h index 2ee26c4036..4aa262e1a8 100644 --- a/include/configs/ti_armv7_keystone2.h +++ b/include/configs/ti_armv7_keystone2.h @@ -89,6 +89,10 @@ #define CONFIG_SYS_SPI2 #define CONFIG_SYS_SPI2_BASE KS2_SPI2_BASE #define CONFIG_SYS_SPI2_NUM_CS 4 +#ifdef CONFIG_SPL_BUILD +#undef CONFIG_DM_SPI +#undef CONFIG_DM_SPI_FLASH +#endif /* Network Configuration */ #define CONFIG_PHYLIB -- cgit From 988fb5ce610bbd2cc5a839cce737bba307e94db7 Mon Sep 17 00:00:00 2001 From: Vignesh R Date: Wed, 6 Jul 2016 10:20:58 +0530 Subject: defconfig: k2g_evm_defconfig: Enable Cadence QSPI controller Enable Cadence QSPI controller support to use QSPI on K2G SoC. Also enable Spansion flash support to access s25fl512s flash present on K2G QSPI bus. Signed-off-by: Vignesh R Reviewed-by: Tom Rini Reviewed-by: Jagan Teki --- include/configs/k2g_evm.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/configs/k2g_evm.h b/include/configs/k2g_evm.h index f8bba6710d..71b00378ff 100644 --- a/include/configs/k2g_evm.h +++ b/include/configs/k2g_evm.h @@ -73,4 +73,10 @@ #define CONFIG_SF_DEFAULT_BUS 1 #define CONFIG_SF_DEFAULT_CS 0 +#ifndef CONFIG_SPL_BUILD +#define CONFIG_CADENCE_QSPI +#define CONFIG_CQSPI_REF_CLK 384000000 +#define CONFIG_CQSPI_DECODER 0x0 +#endif + #endif /* __CONFIG_K2G_EVM_H */ -- cgit