2010-02-12 05:44:53 +08:00
|
|
|
/*
|
|
|
|
* Versatile Express V2M Motherboard Support
|
|
|
|
*/
|
|
|
|
#include <linux/device.h>
|
|
|
|
#include <linux/amba/bus.h>
|
|
|
|
#include <linux/amba/mmci.h>
|
|
|
|
#include <linux/io.h>
|
2011-09-08 20:15:22 +08:00
|
|
|
#include <linux/smp.h>
|
2010-02-12 05:44:53 +08:00
|
|
|
#include <linux/init.h>
|
2012-02-23 21:04:51 +08:00
|
|
|
#include <linux/of_address.h>
|
|
|
|
#include <linux/of_fdt.h>
|
|
|
|
#include <linux/of_irq.h>
|
|
|
|
#include <linux/of_platform.h>
|
2010-02-12 05:44:53 +08:00
|
|
|
#include <linux/platform_device.h>
|
2011-01-21 22:51:06 +08:00
|
|
|
#include <linux/ata_platform.h>
|
2010-02-12 05:44:53 +08:00
|
|
|
#include <linux/smsc911x.h>
|
|
|
|
#include <linux/spinlock.h>
|
|
|
|
#include <linux/usb/isp1760.h>
|
2011-05-18 17:51:51 +08:00
|
|
|
#include <linux/mtd/physmap.h>
|
2012-07-09 18:33:47 +08:00
|
|
|
#include <linux/regulator/fixed.h>
|
|
|
|
#include <linux/regulator/machine.h>
|
2012-10-09 19:56:36 +08:00
|
|
|
#include <linux/vexpress.h>
|
2013-04-19 01:23:22 +08:00
|
|
|
#include <linux/clkdev.h>
|
2010-02-12 05:44:53 +08:00
|
|
|
|
2011-03-01 00:01:04 +08:00
|
|
|
#include <asm/mach-types.h>
|
2010-02-12 05:44:53 +08:00
|
|
|
#include <asm/sizes.h>
|
2011-03-01 00:01:04 +08:00
|
|
|
#include <asm/mach/arch.h>
|
2010-02-12 05:44:53 +08:00
|
|
|
#include <asm/mach/map.h>
|
|
|
|
#include <asm/mach/time.h>
|
|
|
|
#include <asm/hardware/arm_timer.h>
|
2012-02-23 21:04:51 +08:00
|
|
|
#include <asm/hardware/cache-l2x0.h>
|
2011-01-06 02:09:03 +08:00
|
|
|
#include <asm/hardware/timer-sp.h>
|
2010-02-12 05:44:53 +08:00
|
|
|
|
2011-03-01 00:01:04 +08:00
|
|
|
#include <mach/ct-ca9x4.h>
|
2010-02-12 05:44:53 +08:00
|
|
|
#include <mach/motherboard.h>
|
|
|
|
|
2010-12-16 05:58:50 +08:00
|
|
|
#include <plat/sched_clock.h>
|
2011-09-08 20:15:22 +08:00
|
|
|
#include <plat/platsmp.h>
|
2010-02-12 05:44:53 +08:00
|
|
|
|
|
|
|
#include "core.h"
|
|
|
|
|
|
|
|
#define V2M_PA_CS0 0x40000000
|
|
|
|
#define V2M_PA_CS1 0x44000000
|
|
|
|
#define V2M_PA_CS2 0x48000000
|
|
|
|
#define V2M_PA_CS3 0x4c000000
|
|
|
|
#define V2M_PA_CS7 0x10000000
|
|
|
|
|
|
|
|
static struct map_desc v2m_io_desc[] __initdata = {
|
|
|
|
{
|
2012-01-25 23:37:29 +08:00
|
|
|
.virtual = V2M_PERIPH,
|
2010-02-12 05:44:53 +08:00
|
|
|
.pfn = __phys_to_pfn(V2M_PA_CS7),
|
|
|
|
.length = SZ_128K,
|
|
|
|
.type = MT_DEVICE,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2012-01-25 23:37:29 +08:00
|
|
|
static void __init v2m_sp804_init(void __iomem *base, unsigned int irq)
|
|
|
|
{
|
|
|
|
if (WARN_ON(!base || irq == NO_IRQ))
|
|
|
|
return;
|
|
|
|
|
|
|
|
sp804_clocksource_init(base + TIMER_2_BASE, "v2m-timer1");
|
|
|
|
sp804_clockevents_init(base + TIMER_1_BASE, irq, "v2m-timer0");
|
|
|
|
}
|
2010-02-12 05:44:53 +08:00
|
|
|
|
|
|
|
|
|
|
|
static struct resource v2m_pcie_i2c_resource = {
|
|
|
|
.start = V2M_SERIAL_BUS_PCI,
|
|
|
|
.end = V2M_SERIAL_BUS_PCI + SZ_4K - 1,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device v2m_pcie_i2c_device = {
|
|
|
|
.name = "versatile-i2c",
|
|
|
|
.id = 0,
|
|
|
|
.num_resources = 1,
|
|
|
|
.resource = &v2m_pcie_i2c_resource,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct resource v2m_ddc_i2c_resource = {
|
|
|
|
.start = V2M_SERIAL_BUS_DVI,
|
|
|
|
.end = V2M_SERIAL_BUS_DVI + SZ_4K - 1,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device v2m_ddc_i2c_device = {
|
|
|
|
.name = "versatile-i2c",
|
|
|
|
.id = 1,
|
|
|
|
.num_resources = 1,
|
|
|
|
.resource = &v2m_ddc_i2c_resource,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct resource v2m_eth_resources[] = {
|
|
|
|
{
|
|
|
|
.start = V2M_LAN9118,
|
|
|
|
.end = V2M_LAN9118 + SZ_64K - 1,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
}, {
|
|
|
|
.start = IRQ_V2M_LAN9118,
|
|
|
|
.end = IRQ_V2M_LAN9118,
|
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct smsc911x_platform_config v2m_eth_config = {
|
|
|
|
.flags = SMSC911X_USE_32BIT,
|
|
|
|
.irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH,
|
|
|
|
.irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
|
|
|
|
.phy_interface = PHY_INTERFACE_MODE_MII,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device v2m_eth_device = {
|
|
|
|
.name = "smsc911x",
|
|
|
|
.id = -1,
|
|
|
|
.resource = v2m_eth_resources,
|
|
|
|
.num_resources = ARRAY_SIZE(v2m_eth_resources),
|
|
|
|
.dev.platform_data = &v2m_eth_config,
|
|
|
|
};
|
|
|
|
|
2012-07-09 18:33:47 +08:00
|
|
|
static struct regulator_consumer_supply v2m_eth_supplies[] = {
|
|
|
|
REGULATOR_SUPPLY("vddvario", "smsc911x"),
|
|
|
|
REGULATOR_SUPPLY("vdd33a", "smsc911x"),
|
|
|
|
};
|
|
|
|
|
2010-02-12 05:44:53 +08:00
|
|
|
static struct resource v2m_usb_resources[] = {
|
|
|
|
{
|
|
|
|
.start = V2M_ISP1761,
|
|
|
|
.end = V2M_ISP1761 + SZ_128K - 1,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
}, {
|
|
|
|
.start = IRQ_V2M_ISP1761,
|
|
|
|
.end = IRQ_V2M_ISP1761,
|
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct isp1760_platform_data v2m_usb_config = {
|
|
|
|
.is_isp1761 = true,
|
|
|
|
.bus_width_16 = false,
|
|
|
|
.port1_otg = true,
|
|
|
|
.analog_oc = false,
|
|
|
|
.dack_polarity_high = false,
|
|
|
|
.dreq_polarity_high = false,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device v2m_usb_device = {
|
|
|
|
.name = "isp1760",
|
|
|
|
.id = -1,
|
|
|
|
.resource = v2m_usb_resources,
|
|
|
|
.num_resources = ARRAY_SIZE(v2m_usb_resources),
|
|
|
|
.dev.platform_data = &v2m_usb_config,
|
|
|
|
};
|
|
|
|
|
2011-05-18 17:51:51 +08:00
|
|
|
static struct physmap_flash_data v2m_flash_data = {
|
2010-02-12 05:44:53 +08:00
|
|
|
.width = 4,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct resource v2m_flash_resources[] = {
|
|
|
|
{
|
|
|
|
.start = V2M_NOR0,
|
|
|
|
.end = V2M_NOR0 + SZ_64M - 1,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
}, {
|
|
|
|
.start = V2M_NOR1,
|
|
|
|
.end = V2M_NOR1 + SZ_64M - 1,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device v2m_flash_device = {
|
2011-05-18 17:51:51 +08:00
|
|
|
.name = "physmap-flash",
|
2010-02-12 05:44:53 +08:00
|
|
|
.id = -1,
|
|
|
|
.resource = v2m_flash_resources,
|
|
|
|
.num_resources = ARRAY_SIZE(v2m_flash_resources),
|
|
|
|
.dev.platform_data = &v2m_flash_data,
|
|
|
|
};
|
|
|
|
|
2011-01-21 22:51:06 +08:00
|
|
|
static struct pata_platform_info v2m_pata_data = {
|
|
|
|
.ioport_shift = 2,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct resource v2m_pata_resources[] = {
|
|
|
|
{
|
|
|
|
.start = V2M_CF,
|
|
|
|
.end = V2M_CF + 0xff,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
}, {
|
|
|
|
.start = V2M_CF + 0x100,
|
|
|
|
.end = V2M_CF + SZ_4K - 1,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device v2m_cf_device = {
|
|
|
|
.name = "pata_platform",
|
|
|
|
.id = -1,
|
|
|
|
.resource = v2m_pata_resources,
|
|
|
|
.num_resources = ARRAY_SIZE(v2m_pata_resources),
|
|
|
|
.dev.platform_data = &v2m_pata_data,
|
|
|
|
};
|
2010-02-12 05:44:53 +08:00
|
|
|
|
|
|
|
static struct mmci_platform_data v2m_mmci_data = {
|
|
|
|
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
2014-04-23 17:49:31 +08:00
|
|
|
.status = vexpress_get_mci_cardin,
|
|
|
|
.gpio_cd = -1,
|
|
|
|
.gpio_wp = -1,
|
2012-10-09 19:56:36 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
static struct resource v2m_sysreg_resources[] = {
|
|
|
|
{
|
|
|
|
.start = V2M_SYSREGS,
|
|
|
|
.end = V2M_SYSREGS + 0xfff,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device v2m_sysreg_device = {
|
|
|
|
.name = "vexpress-sysreg",
|
|
|
|
.id = -1,
|
|
|
|
.resource = v2m_sysreg_resources,
|
|
|
|
.num_resources = ARRAY_SIZE(v2m_sysreg_resources),
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device v2m_muxfpga_device = {
|
|
|
|
.name = "vexpress-muxfpga",
|
|
|
|
.id = 0,
|
|
|
|
.num_resources = 1,
|
|
|
|
.resource = (struct resource []) {
|
|
|
|
VEXPRESS_RES_FUNC(0, 7),
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device v2m_shutdown_device = {
|
|
|
|
.name = "vexpress-shutdown",
|
|
|
|
.id = 0,
|
|
|
|
.num_resources = 1,
|
|
|
|
.resource = (struct resource []) {
|
|
|
|
VEXPRESS_RES_FUNC(0, 8),
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device v2m_reboot_device = {
|
|
|
|
.name = "vexpress-reboot",
|
|
|
|
.id = 0,
|
|
|
|
.num_resources = 1,
|
|
|
|
.resource = (struct resource []) {
|
|
|
|
VEXPRESS_RES_FUNC(0, 9),
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device v2m_dvimode_device = {
|
|
|
|
.name = "vexpress-dvimode",
|
|
|
|
.id = 0,
|
|
|
|
.num_resources = 1,
|
|
|
|
.resource = (struct resource []) {
|
|
|
|
VEXPRESS_RES_FUNC(0, 11),
|
|
|
|
}
|
2010-02-12 05:44:53 +08:00
|
|
|
};
|
|
|
|
|
2011-12-18 20:07:09 +08:00
|
|
|
static AMBA_APB_DEVICE(aaci, "mb:aaci", 0, V2M_AACI, IRQ_V2M_AACI, NULL);
|
|
|
|
static AMBA_APB_DEVICE(mmci, "mb:mmci", 0, V2M_MMCI, IRQ_V2M_MMCI, &v2m_mmci_data);
|
|
|
|
static AMBA_APB_DEVICE(kmi0, "mb:kmi0", 0, V2M_KMI0, IRQ_V2M_KMI0, NULL);
|
|
|
|
static AMBA_APB_DEVICE(kmi1, "mb:kmi1", 0, V2M_KMI1, IRQ_V2M_KMI1, NULL);
|
|
|
|
static AMBA_APB_DEVICE(uart0, "mb:uart0", 0, V2M_UART0, IRQ_V2M_UART0, NULL);
|
|
|
|
static AMBA_APB_DEVICE(uart1, "mb:uart1", 0, V2M_UART1, IRQ_V2M_UART1, NULL);
|
|
|
|
static AMBA_APB_DEVICE(uart2, "mb:uart2", 0, V2M_UART2, IRQ_V2M_UART2, NULL);
|
|
|
|
static AMBA_APB_DEVICE(uart3, "mb:uart3", 0, V2M_UART3, IRQ_V2M_UART3, NULL);
|
|
|
|
static AMBA_APB_DEVICE(wdt, "mb:wdt", 0, V2M_WDT, IRQ_V2M_WDT, NULL);
|
|
|
|
static AMBA_APB_DEVICE(rtc, "mb:rtc", 0, V2M_RTC, IRQ_V2M_RTC, NULL);
|
2010-02-12 05:44:53 +08:00
|
|
|
|
|
|
|
static struct amba_device *v2m_amba_devs[] __initdata = {
|
|
|
|
&aaci_device,
|
|
|
|
&mmci_device,
|
|
|
|
&kmi0_device,
|
|
|
|
&kmi1_device,
|
|
|
|
&uart0_device,
|
|
|
|
&uart1_device,
|
|
|
|
&uart2_device,
|
|
|
|
&uart3_device,
|
|
|
|
&wdt_device,
|
|
|
|
&rtc_device,
|
|
|
|
};
|
|
|
|
|
2012-07-13 18:48:16 +08:00
|
|
|
static void __init v2m_timer_init(void)
|
|
|
|
{
|
2012-10-09 19:56:36 +08:00
|
|
|
vexpress_clk_init(ioremap(V2M_SYSCTL, SZ_4K));
|
2012-07-13 18:48:16 +08:00
|
|
|
v2m_sp804_init(ioremap(V2M_TIMER01, SZ_4K), IRQ_V2M_TIMER0);
|
|
|
|
}
|
|
|
|
|
2011-05-31 02:44:22 +08:00
|
|
|
static void __init v2m_init_early(void)
|
|
|
|
{
|
2012-07-13 18:48:16 +08:00
|
|
|
if (ct_desc->init_early)
|
|
|
|
ct_desc->init_early();
|
2012-10-09 19:56:36 +08:00
|
|
|
versatile_sched_clock_init(vexpress_get_24mhz_clock_base(), 24000000);
|
2010-02-12 05:44:53 +08:00
|
|
|
}
|
|
|
|
|
2011-03-01 00:01:04 +08:00
|
|
|
struct ct_desc *ct_desc;
|
|
|
|
|
|
|
|
static struct ct_desc *ct_descs[] __initdata = {
|
|
|
|
#ifdef CONFIG_ARCH_VEXPRESS_CA9X4
|
|
|
|
&ct_ca9x4_desc,
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
static void __init v2m_populate_ct_desc(void)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
u32 current_tile_id;
|
|
|
|
|
|
|
|
ct_desc = NULL;
|
2012-10-09 19:56:36 +08:00
|
|
|
current_tile_id = vexpress_get_procid(VEXPRESS_SITE_MASTER)
|
2012-01-25 23:37:29 +08:00
|
|
|
& V2M_CT_ID_MASK;
|
2011-03-01 00:01:04 +08:00
|
|
|
|
|
|
|
for (i = 0; i < ARRAY_SIZE(ct_descs) && !ct_desc; ++i)
|
|
|
|
if (ct_descs[i]->id == current_tile_id)
|
|
|
|
ct_desc = ct_descs[i];
|
|
|
|
|
|
|
|
if (!ct_desc)
|
2012-02-23 21:04:51 +08:00
|
|
|
panic("vexpress: this kernel does not support core tile ID 0x%08x when booting via ATAGs.\n"
|
|
|
|
"You may need a device tree blob or a different kernel to boot on this board.\n",
|
|
|
|
current_tile_id);
|
2011-03-01 00:01:04 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void __init v2m_map_io(void)
|
|
|
|
{
|
|
|
|
iotable_init(v2m_io_desc, ARRAY_SIZE(v2m_io_desc));
|
2012-10-09 19:56:36 +08:00
|
|
|
vexpress_sysreg_early_init(ioremap(V2M_SYSREGS, SZ_4K));
|
2011-03-01 00:01:04 +08:00
|
|
|
v2m_populate_ct_desc();
|
|
|
|
ct_desc->map_io();
|
|
|
|
}
|
|
|
|
|
|
|
|
static void __init v2m_init_irq(void)
|
|
|
|
{
|
|
|
|
ct_desc->init_irq();
|
|
|
|
}
|
|
|
|
|
|
|
|
static void __init v2m_init(void)
|
2010-02-12 05:44:53 +08:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
2012-07-09 18:33:47 +08:00
|
|
|
regulator_register_fixed(0, v2m_eth_supplies,
|
|
|
|
ARRAY_SIZE(v2m_eth_supplies));
|
|
|
|
|
2012-10-09 19:56:36 +08:00
|
|
|
platform_device_register(&v2m_sysreg_device);
|
2010-02-12 05:44:53 +08:00
|
|
|
platform_device_register(&v2m_pcie_i2c_device);
|
|
|
|
platform_device_register(&v2m_ddc_i2c_device);
|
|
|
|
platform_device_register(&v2m_flash_device);
|
2011-01-21 22:51:06 +08:00
|
|
|
platform_device_register(&v2m_cf_device);
|
2010-02-12 05:44:53 +08:00
|
|
|
platform_device_register(&v2m_eth_device);
|
|
|
|
platform_device_register(&v2m_usb_device);
|
|
|
|
|
|
|
|
for (i = 0; i < ARRAY_SIZE(v2m_amba_devs); i++)
|
|
|
|
amba_device_register(v2m_amba_devs[i], &iomem_resource);
|
|
|
|
|
2014-04-23 17:49:31 +08:00
|
|
|
vexpress_syscfg_device_register(&v2m_muxfpga_device);
|
|
|
|
vexpress_syscfg_device_register(&v2m_shutdown_device);
|
|
|
|
vexpress_syscfg_device_register(&v2m_reboot_device);
|
|
|
|
vexpress_syscfg_device_register(&v2m_dvimode_device);
|
mfd: vexpress: Convert custom func API to regmap
Components of the Versatile Express platform (configuration
microcontrollers on motherboard and daughterboards in particular)
talk to each other over a custom configuration bus. They
provide miscellaneous functions (from clock generator control
to energy sensors) which are represented as platform devices
(and Device Tree nodes). The transactions on the bus can
be generated by different "bridges" in the system, some
of which are universal for the whole platform (for the price
of high transfer latencies), others restricted to a subsystem
(but much faster).
Until now drivers for such functions were using custom "func"
API, which is being replaced in this patch by regmap calls.
This required:
* a rework (and move to drivers/bus directory, as suggested
by Samuel and Arnd) of the config bus core, which is much
simpler now and uses device model infrastructure (class)
to keep track of the bridges; non-DT case (soon to be
retired anyway) is simply covered by a special device
registration function
* the new config-bus driver also takes over device population,
so there is no need for special matching table for
of_platform_populate nor "simple-bus" hack in the arm64
model dtsi file (relevant bindings documentation has
been updated); this allows all the vexpress devices
fit into normal device model, making it possible
to remove plenty of early inits and other hacks in
the near future
* adaptation of the syscfg bridge implementation in the
sysreg driver, again making it much simpler; there is
a special case of the "energy" function spanning two
registers, where they should be both defined in the tree
now, but backward compatibility is maintained in the code
* modification of the relevant drivers:
* hwmon - just a straight-forward API change
* power/reset driver - API change
* regulator - API change plus error handling
simplification
* osc clock driver - this one required larger rework
in order to turn in into a standard platform driver
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Acked-by: Mark Brown <broonie@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Mike Turquette <mturquette@linaro.org>
2014-04-30 23:46:29 +08:00
|
|
|
|
2011-03-01 00:01:04 +08:00
|
|
|
ct_desc->init_tile();
|
2010-02-12 05:44:53 +08:00
|
|
|
}
|
2011-03-01 00:01:04 +08:00
|
|
|
|
|
|
|
MACHINE_START(VEXPRESS, "ARM-Versatile Express")
|
2011-07-06 10:38:18 +08:00
|
|
|
.atag_offset = 0x100,
|
2011-09-08 20:15:22 +08:00
|
|
|
.smp = smp_ops(vexpress_smp_ops),
|
2011-03-01 00:01:04 +08:00
|
|
|
.map_io = v2m_map_io,
|
|
|
|
.init_early = v2m_init_early,
|
|
|
|
.init_irq = v2m_init_irq,
|
2012-11-09 03:40:59 +08:00
|
|
|
.init_time = v2m_timer_init,
|
2011-03-01 00:01:04 +08:00
|
|
|
.init_machine = v2m_init,
|
|
|
|
MACHINE_END
|
2012-02-23 21:04:51 +08:00
|
|
|
|
|
|
|
static void __init v2m_dt_init(void)
|
|
|
|
{
|
mfd: vexpress: Convert custom func API to regmap
Components of the Versatile Express platform (configuration
microcontrollers on motherboard and daughterboards in particular)
talk to each other over a custom configuration bus. They
provide miscellaneous functions (from clock generator control
to energy sensors) which are represented as platform devices
(and Device Tree nodes). The transactions on the bus can
be generated by different "bridges" in the system, some
of which are universal for the whole platform (for the price
of high transfer latencies), others restricted to a subsystem
(but much faster).
Until now drivers for such functions were using custom "func"
API, which is being replaced in this patch by regmap calls.
This required:
* a rework (and move to drivers/bus directory, as suggested
by Samuel and Arnd) of the config bus core, which is much
simpler now and uses device model infrastructure (class)
to keep track of the bridges; non-DT case (soon to be
retired anyway) is simply covered by a special device
registration function
* the new config-bus driver also takes over device population,
so there is no need for special matching table for
of_platform_populate nor "simple-bus" hack in the arm64
model dtsi file (relevant bindings documentation has
been updated); this allows all the vexpress devices
fit into normal device model, making it possible
to remove plenty of early inits and other hacks in
the near future
* adaptation of the syscfg bridge implementation in the
sysreg driver, again making it much simpler; there is
a special case of the "energy" function spanning two
registers, where they should be both defined in the tree
now, but backward compatibility is maintained in the code
* modification of the relevant drivers:
* hwmon - just a straight-forward API change
* power/reset driver - API change
* regulator - API change plus error handling
simplification
* osc clock driver - this one required larger rework
in order to turn in into a standard platform driver
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Acked-by: Mark Brown <broonie@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Mike Turquette <mturquette@linaro.org>
2014-04-30 23:46:29 +08:00
|
|
|
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
|
2012-02-23 21:04:51 +08:00
|
|
|
}
|
|
|
|
|
2012-10-09 19:56:36 +08:00
|
|
|
static const char * const v2m_dt_match[] __initconst = {
|
2012-02-23 21:04:51 +08:00
|
|
|
"arm,vexpress",
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express")
|
|
|
|
.dt_compat = v2m_dt_match,
|
2014-04-28 22:43:12 +08:00
|
|
|
.l2c_aux_val = 0x00400000,
|
|
|
|
.l2c_aux_mask = 0xfe0fffff,
|
2013-09-18 01:30:58 +08:00
|
|
|
.smp = smp_ops(vexpress_smp_dt_ops),
|
2013-01-30 17:12:55 +08:00
|
|
|
.smp_init = smp_init_ops(vexpress_smp_init_ops),
|
2012-02-23 21:04:51 +08:00
|
|
|
.init_machine = v2m_dt_init,
|
|
|
|
MACHINE_END
|