diff options
author | Lee Jones <lee.jones@linaro.org> | 2012-02-06 11:22:24 -0800 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-02-13 06:31:38 +0000 |
commit | eda413c228e227d888bc13d210e7c4c6aa62a682 (patch) | |
tree | 998f73c26e85a3557a2c911fd954c7ad0c0c8462 /arch/arm/mach-ux500/cpu-db5500.c | |
parent | 18403424c4fe5bac509bf52343f5d5407d45ee3a (diff) | |
download | blackbird-op-linux-eda413c228e227d888bc13d210e7c4c6aa62a682.tar.gz blackbird-op-linux-eda413c228e227d888bc13d210e7c4c6aa62a682.zip |
ARM: ux500: export System-on-Chip information ux500 via sysfs
Here we make use of the new System-On-Chip bus driver to export
vital SoC information out to userspace via sysfs. This patch
provides a data structure of strings to populate the base
nodes found in:
/sys/devices/soc[0|1|2|...]/[family|machine|revision|soc_id].
It also adds one more node as requested by ST-Ericsson.
'process' depicts the way in which the silicon was manufactured.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-ux500/cpu-db5500.c')
-rw-r--r-- | arch/arm/mach-ux500/cpu-db5500.c | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/arch/arm/mach-ux500/cpu-db5500.c b/arch/arm/mach-ux500/cpu-db5500.c index c402fd6efe53..8f8acfdd4a1b 100644 --- a/arch/arm/mach-ux500/cpu-db5500.c +++ b/arch/arm/mach-ux500/cpu-db5500.c @@ -212,18 +212,32 @@ static int usb_db5500_tx_dma_cfg[] = { DB5500_DMA_DEV38_USB_OTG_OEP_8 }; -struct device* __init u5500_init_devices(void) +static const char *db5500_read_soc_id(void) { - /* FIXME: First parameter to be a real parent. */ - db5500_add_gpios(NULL); + return kasprintf(GFP_KERNEL, "u5500 currently unsupported\n"); +} + +static struct device * __init db5500_soc_device_init(void) +{ + const char *soc_id = db5500_read_soc_id(); + + return ux500_soc_device_init(soc_id); +} + +struct device * __init u5500_init_devices(void) +{ + struct device *parent; + + parent = db5500_soc_device_init(); + + db5500_add_gpios(parent); db5500_pmu_init(); - db5500_dma_init(NULL); - db5500_add_rtc(NULL); - db5500_add_usb(NULL, usb_db5500_rx_dma_cfg, usb_db5500_tx_dma_cfg); + db5500_dma_init(parent); + db5500_add_rtc(parent); + db5500_add_usb(parent, usb_db5500_rx_dma_cfg, usb_db5500_tx_dma_cfg); platform_add_devices(db5500_platform_devs, ARRAY_SIZE(db5500_platform_devs)); - /* FIXME: Return value to be a real parent. */ - return NULL; + return parent; } |