0001
0002
0003
0004
0005
0006 #include <linux/types.h>
0007 #include <linux/init.h>
0008 #include <linux/device.h>
0009 #include <linux/amba/bus.h>
0010 #include <linux/platform_device.h>
0011 #include <linux/io.h>
0012 #include <linux/slab.h>
0013 #include <linux/irq.h>
0014 #include <linux/dma-mapping.h>
0015 #include <linux/of_irq.h>
0016 #include <linux/of_address.h>
0017 #include <linux/of_platform.h>
0018
0019 #include <asm/mach/arch.h>
0020 #include <asm/mach/map.h>
0021 #include <asm/mach/time.h>
0022 #include <asm/mach-types.h>
0023
0024 #include <asm/cacheflush.h>
0025 #include <asm/hardware/cache-l2x0.h>
0026
0027
0028
0029
0030 #define NOMADIK_FSMC_BASE 0x10100000
0031 #define NOMADIK_SDRAMC_BASE 0x10110000
0032 #define NOMADIK_CLCDC_BASE 0x10120000
0033 #define NOMADIK_MDIF_BASE 0x10120000
0034 #define NOMADIK_DMA0_BASE 0x10130000
0035 #define NOMADIK_IC_BASE 0x10140000
0036 #define NOMADIK_DMA1_BASE 0x10150000
0037 #define NOMADIK_USB_BASE 0x10170000
0038 #define NOMADIK_CRYP_BASE 0x10180000
0039 #define NOMADIK_SHA1_BASE 0x10190000
0040 #define NOMADIK_XTI_BASE 0x101A0000
0041 #define NOMADIK_RNG_BASE 0x101B0000
0042 #define NOMADIK_SRC_BASE 0x101E0000
0043 #define NOMADIK_WDOG_BASE 0x101E1000
0044 #define NOMADIK_MTU0_BASE 0x101E2000
0045 #define NOMADIK_MTU1_BASE 0x101E3000
0046 #define NOMADIK_GPIO0_BASE 0x101E4000
0047 #define NOMADIK_GPIO1_BASE 0x101E5000
0048 #define NOMADIK_GPIO2_BASE 0x101E6000
0049 #define NOMADIK_GPIO3_BASE 0x101E7000
0050 #define NOMADIK_RTC_BASE 0x101E8000
0051 #define NOMADIK_PMU_BASE 0x101E9000
0052 #define NOMADIK_OWM_BASE 0x101EA000
0053 #define NOMADIK_SCR_BASE 0x101EF000
0054 #define NOMADIK_MSP2_BASE 0x101F0000
0055 #define NOMADIK_MSP1_BASE 0x101F1000
0056 #define NOMADIK_UART2_BASE 0x101F2000
0057 #define NOMADIK_SSIRx_BASE 0x101F3000
0058 #define NOMADIK_SSITx_BASE 0x101F4000
0059 #define NOMADIK_MSHC_BASE 0x101F5000
0060 #define NOMADIK_SDI_BASE 0x101F6000
0061 #define NOMADIK_I2C1_BASE 0x101F7000
0062 #define NOMADIK_I2C0_BASE 0x101F8000
0063 #define NOMADIK_MSP0_BASE 0x101F9000
0064 #define NOMADIK_FIRDA_BASE 0x101FA000
0065 #define NOMADIK_UART1_BASE 0x101FB000
0066 #define NOMADIK_SSP_BASE 0x101FC000
0067 #define NOMADIK_UART0_BASE 0x101FD000
0068 #define NOMADIK_SGA_BASE 0x101FE000
0069 #define NOMADIK_L2CC_BASE 0x10210000
0070 #define NOMADIK_UART1_VBASE 0xF01FB000
0071
0072
0073 static struct map_desc cpu8815_io_desc[] __initdata = {
0074 {
0075 .virtual = NOMADIK_UART1_VBASE,
0076 .pfn = __phys_to_pfn(NOMADIK_UART1_BASE),
0077 .length = SZ_4K,
0078 .type = MT_DEVICE,
0079 },
0080 };
0081
0082 static void __init cpu8815_map_io(void)
0083 {
0084 iotable_init(cpu8815_io_desc, ARRAY_SIZE(cpu8815_io_desc));
0085 }
0086
0087 static void cpu8815_restart(enum reboot_mode mode, const char *cmd)
0088 {
0089 void __iomem *srcbase = ioremap(NOMADIK_SRC_BASE, SZ_4K);
0090
0091
0092
0093
0094 writel(1, srcbase + 0x18);
0095 }
0096
0097 static const char * cpu8815_board_compat[] = {
0098 "st,nomadik-nhk-15",
0099 "calaosystems,usb-s8815",
0100 NULL,
0101 };
0102
0103 DT_MACHINE_START(NOMADIK_DT, "Nomadik STn8815")
0104 .l2c_aux_val = 0,
0105 .l2c_aux_mask = ~0,
0106 .map_io = cpu8815_map_io,
0107 .restart = cpu8815_restart,
0108 .dt_compat = cpu8815_board_compat,
0109 MACHINE_END