From d2c24cf1564908b8f002cf9cb7dfe5b63c3b93d2 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Mon, 25 Mar 2013 15:02:36 +0400 Subject: ARM: ux500: Add device nodes for TCDM and TCPM memory locations The PRCMU requires the Tightly Coupled Memory (TCM) locations in order to function correctly. A recent move to send the base addresses though the PRCMU platform device resource instead of defines found in , means that dbx500 devices can no longer boot successfully. These new nodes will allow the PRCMU to extract the base memory locations from Device Tree instead. Signed-off-by: Lee Jones --- arch/arm/boot/dts/snowball.dts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts index d3ec32f6b790..6195ffa8ee02 100644 --- a/arch/arm/boot/dts/snowball.dts +++ b/arch/arm/boot/dts/snowball.dts @@ -126,6 +126,14 @@ }; }; + prcmu-tcpm-per4@801b0000 { + reg = <0x801b0000 0x1000>; + }; + + prcmu-tcdm-per4@801b8000 { + reg = <0x801b8000 0x1000>; + }; + external-bus@50000000 { status = "okay"; -- cgit v1.2.3 From 18d999a7d450aee44854bfcaf543cf052ada4257 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Mon, 25 Mar 2013 15:02:37 +0400 Subject: mfd: db8500-prcmu: Fetch the PRCMU TCDM base address from Device Tree A recent move to send the base addresses though the PRCMU platform device resource instead of defines found in , means that dbx500 devices can no longer boot successfully when booting with Device Tree enabled. This patch ensures the addresses are obtained correctly from DT. Signed-off-by: Lee Jones --- drivers/mfd/db8500-prcmu.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index 21f261bf9e95..8602bf85b450 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c @@ -17,6 +17,8 @@ #include #include #include +#include +#include #include #include #include @@ -2790,19 +2792,29 @@ static int db8500_irq_init(struct device_node *np) } static void dbx500_fw_version_init(struct platform_device *pdev, - u32 version_offset) + u32 version_offset, + struct device_node *np) { + struct device_node *tcpm_np; struct resource *res; - void __iomem *tcpm_base; + void __iomem *tcpm_base = NULL; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "prcmu-tcpm"); if (!res) { - dev_err(&pdev->dev, - "Error: no prcmu tcpm memory region provided\n"); - return; - } - tcpm_base = ioremap(res->start, resource_size(res)); + if (np) { + tcpm_np = of_find_node_by_name(np->parent, + "prcmu-tcpm-per4"); + if (!tcpm_np) { + dev_err(&pdev->dev, + "no prcmu tcpm mem region provided\n"); + return; + } + tcpm_base = of_iomap(tcpm_np, 0); + } + } else + tcpm_base = ioremap(res->start, resource_size(res)); + if (tcpm_base != NULL) { u32 version; @@ -3154,7 +3166,7 @@ static int db8500_prcmu_probe(struct platform_device *pdev) init_prcm_registers(); - dbx500_fw_version_init(pdev, pdata->version_offset); + dbx500_fw_version_init(pdev, pdata->version_offset, np); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "prcmu-tcdm"); if (!res) { dev_err(&pdev->dev, "no prcmu tcdm region provided\n"); -- cgit v1.2.3 From e856ced6e9b02af26672bf7126c86a6f8d4c5d16 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Mon, 25 Mar 2013 15:02:38 +0400 Subject: mfd: db8500-prcmu: Fetch the PRCMU TCPM base address from Device Tree A recent move to send the base addresses though the PRCMU platform device resource instead of defines found in , means that dbx500 devices can no longer boot successfully when booting with Device Tree enabled. This patch ensures the addresses are obtained correctly from DT instead. Signed-off-by: Lee Jones --- drivers/mfd/db8500-prcmu.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index 8602bf85b450..a998edc73c99 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c @@ -3159,8 +3159,9 @@ static void db8500_prcmu_update_cpufreq(void) */ static int db8500_prcmu_probe(struct platform_device *pdev) { - struct device_node *np = pdev->dev.of_node; struct prcmu_pdata *pdata = dev_get_platdata(&pdev->dev); + struct device_node *np = pdev->dev.of_node; + struct device_node *tcdm_np; int irq = 0, err = 0, i; struct resource *res; @@ -3169,11 +3170,19 @@ static int db8500_prcmu_probe(struct platform_device *pdev) dbx500_fw_version_init(pdev, pdata->version_offset, np); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "prcmu-tcdm"); if (!res) { - dev_err(&pdev->dev, "no prcmu tcdm region provided\n"); - return -ENOENT; - } - tcdm_base = devm_ioremap(&pdev->dev, res->start, - resource_size(res)); + if (np) { + tcdm_np = of_find_node_by_name(np->parent, + "prcmu-tcdm-per4"); + if (!tcdm_np) { + dev_err(&pdev->dev, + "no prcmu tcdm region provided\n"); + return -ENOENT; + } + tcdm_base = of_iomap(tcdm_np, 0); + } + } else + tcdm_base = devm_ioremap(&pdev->dev, res->start, + resource_size(res)); /* Clean up the mailbox interrupts after pre-kernel code. */ writel(ALL_MBOX_BITS, PRCM_ARM_IT1_CLR); -- cgit v1.2.3 From 37a640f2efbcc34e17684f0485d75cfcc70c12ff Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Mon, 25 Mar 2013 23:31:30 +0400 Subject: u8500.conf: update the conf fragment from v3.9-rc3 u8500_defconfig Signed-off-by: Andrey Konovalov --- linaro/configs/u8500.conf | 41 +++-------------------------------------- 1 file changed, 3 insertions(+), 38 deletions(-) diff --git a/linaro/configs/u8500.conf b/linaro/configs/u8500.conf index 61c1f232de80..86e294faa2f6 100644 --- a/linaro/configs/u8500.conf +++ b/linaro/configs/u8500.conf @@ -1,47 +1,24 @@ -CONFIG_EXPERIMENTAL=y # CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_BLK_DEV_INITRD=y CONFIG_KALLSYMS_ALL=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y # CONFIG_BLK_DEV_BSG is not set CONFIG_ARCH_U8500=y CONFIG_MACH_HREFV60=y CONFIG_MACH_SNOWBALL=y CONFIG_MACH_UX500_DT=y -CONFIG_SMP=y CONFIG_NR_CPUS=2 CONFIG_PREEMPT=y -CONFIG_AEABI=y CONFIG_CMDLINE="root=/dev/ram0 console=ttyAMA2,115200n8" -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y CONFIG_VFP=y CONFIG_NEON=y CONFIG_PM_RUNTIME=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IPV6=y CONFIG_INET6_XFRM_MODE_TRANSPORT=m CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_INET6_XFRM_MODE_BEET=m CONFIG_IPV6_SIT=m -CONFIG_NETFILTER=y CONFIG_PHONET=y # CONFIG_WIRELESS is not set CONFIG_CAIF=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=65536 CONFIG_SENSORS_BH1780=y -CONFIG_NETDEVICES=y CONFIG_SMSC911X=y CONFIG_SMSC_PHY=y # CONFIG_WLAN is not set @@ -55,7 +32,6 @@ CONFIG_KEYBOARD_TC3589X=y # CONFIG_INPUT_MOUSE is not set CONFIG_INPUT_TOUCHSCREEN=y CONFIG_TOUCHSCREEN_BU21013=y -CONFIG_INPUT_MISC=y CONFIG_INPUT_AB8500_PONKEY=y # CONFIG_SERIO is not set CONFIG_VT_HW_CONSOLE_BINDING=y @@ -63,17 +39,16 @@ CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_SERIAL_AMBA_PL011=y CONFIG_SERIAL_AMBA_PL011_CONSOLE=y CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_NOMADIK=y CONFIG_SPI=y CONFIG_SPI_PL022=y CONFIG_GPIO_STMPE=y CONFIG_GPIO_TC3589X=y -CONFIG_POWER_SUPPLY=y -CONFIG_AB8500_BM=y -CONFIG_AB8500_BATTERY_THERM_ON_BATCTRL=y +CONFIG_THERMAL=y +CONFIG_CPU_THERMAL=y CONFIG_MFD_STMPE=y CONFIG_MFD_TC3589X=y CONFIG_AB8500_CORE=y +CONFIG_REGULATOR_GPIO=y CONFIG_REGULATOR_AB8500=y CONFIG_USB_GADGET=y CONFIG_AB8500_USB=y @@ -93,23 +68,13 @@ CONFIG_STE_DMA40=y CONFIG_STAGING=y CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4=y CONFIG_HSEM_U8500=y -CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_POSIX_ACL=y CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT4_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y CONFIG_CONFIGFS_FS=m # CONFIG_MISC_FILESYSTEMS is not set CONFIG_NFS_FS=y CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y CONFIG_DEBUG_KERNEL=y # CONFIG_SCHED_DEBUG is not set # CONFIG_DEBUG_PREEMPT is not set -- cgit v1.2.3 From 878ff97002f795fd5d764c05cbafeeb678b71c81 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Tue, 26 Mar 2013 10:26:15 +0000 Subject: ARM: ux500: Apply the TCPM and TCDM locations and sizes to dbx5x0 DT This fixes a regression introduced by commit: 05ec260 mfd:db8500-prcmu: update resource passing All DBx5x0 based SoCs have access to two Tightly Coupled Memory (TCM) locations based on the PRCMU itself. One area from program memory (TCPM) and one for data memory (TCDM). The PRCMU needs to know where these are in order to function correctly. However, these are currently passed though platform device resources, which can only be obtained if Device Tree booting isn't in use. Thus we must also support them in DT by supplying them through the PRCMU node. Signed-off-by: Lee Jones --- arch/arm/boot/dts/dbx5x0.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi index 9de93096601a..aaa63d0a8096 100644 --- a/arch/arm/boot/dts/dbx5x0.dtsi +++ b/arch/arm/boot/dts/dbx5x0.dtsi @@ -191,8 +191,8 @@ prcmu: prcmu@80157000 { compatible = "stericsson,db8500-prcmu"; - reg = <0x80157000 0x1000>; - reg-names = "prcmu"; + reg = <0x80157000 0x1000>, <0x801b0000 0x8000>, <0x801b8000 0x1000>; + reg-names = "prcmu", "prcmu-tcpm", "prcmu-tcdm"; interrupts = <0 47 0x4>; #address-cells = <1>; #size-cells = <1>; -- cgit v1.2.3 From 49df78e8c17c57c7f0f70311efe45f54bde0c936 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Wed, 27 Mar 2013 10:47:38 +0000 Subject: ARM: ux500: Stop passing ios_handler() as an MMCI power controlling call-back This fixes a regression introduced during the v3.9 merge window. Now MMCI on/off functionality is using the regulator framework from the MMCI driver, if we provide the ios_handler call-back we essentially duplicate functionality, which causes a large mess and lots of booting issues. Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500-sdi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c index 051b62c27102..7f2cb6c5e2c1 100644 --- a/arch/arm/mach-ux500/board-mop500-sdi.c +++ b/arch/arm/mach-ux500/board-mop500-sdi.c @@ -81,7 +81,6 @@ static struct stedma40_chan_cfg mop500_sdi0_dma_cfg_tx = { #endif struct mmci_platform_data mop500_sdi0_data = { - .ios_handler = mop500_sdi0_ios_handler, .ocr_mask = MMC_VDD_29_30, .f_max = 50000000, .capabilities = MMC_CAP_4_BIT_DATA | -- cgit v1.2.3