0001
0002
0003
0004
0005 #include <linux/kernel.h>
0006 #include <linux/init.h>
0007 #include <linux/io.h>
0008
0009 #include <asm/mach/arch.h>
0010 #include <asm/mach/map.h>
0011
0012
0013
0014
0015
0016 #define IXP4XX_EXP_CFG_BASE_PHYS 0xC4000000
0017 #define IXP4XX_EXP_CFG_BASE_VIRT 0xFEC14000
0018
0019 static struct map_desc ixp4xx_of_io_desc[] __initdata = {
0020
0021
0022
0023
0024
0025
0026 {
0027 .virtual = IXP4XX_EXP_CFG_BASE_VIRT,
0028 .pfn = __phys_to_pfn(IXP4XX_EXP_CFG_BASE_PHYS),
0029 .length = SZ_4K,
0030 .type = MT_DEVICE,
0031 },
0032 #ifdef CONFIG_DEBUG_UART_8250
0033
0034 {
0035 .virtual = CONFIG_DEBUG_UART_VIRT,
0036 .pfn = __phys_to_pfn(CONFIG_DEBUG_UART_PHYS),
0037 .length = SZ_4K,
0038 .type = MT_DEVICE,
0039 },
0040 #endif
0041 };
0042
0043 static void __init ixp4xx_of_map_io(void)
0044 {
0045 iotable_init(ixp4xx_of_io_desc, ARRAY_SIZE(ixp4xx_of_io_desc));
0046 }
0047
0048
0049
0050
0051
0052
0053 static const char *ixp4xx_of_board_compat[] = {
0054 "intel,ixp42x",
0055 "intel,ixp43x",
0056 "intel,ixp45x",
0057 "intel,ixp46x",
0058 NULL,
0059 };
0060
0061 DT_MACHINE_START(IXP4XX_DT, "IXP4xx (Device Tree)")
0062 .map_io = ixp4xx_of_map_io,
0063 .dt_compat = ixp4xx_of_board_compat,
0064 MACHINE_END