18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * arch/arm/mach-ixp4xx/nslu2-setup.c
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * NSLU2 board-setup
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci * Copyright (C) 2008 Rod Whitby <rod@whitby.id.au>
88c2ecf20Sopenharmony_ci *
98c2ecf20Sopenharmony_ci * based on ixdp425-setup.c:
108c2ecf20Sopenharmony_ci *      Copyright (C) 2003-2004 MontaVista Software, Inc.
118c2ecf20Sopenharmony_ci * based on nslu2-power.c:
128c2ecf20Sopenharmony_ci *	Copyright (C) 2005 Tower Technologies
138c2ecf20Sopenharmony_ci *
148c2ecf20Sopenharmony_ci * Author: Mark Rakes <mrakes at mac.com>
158c2ecf20Sopenharmony_ci * Author: Rod Whitby <rod@whitby.id.au>
168c2ecf20Sopenharmony_ci * Author: Alessandro Zummo <a.zummo@towertech.it>
178c2ecf20Sopenharmony_ci * Maintainers: http://www.nslu2-linux.org/
188c2ecf20Sopenharmony_ci *
198c2ecf20Sopenharmony_ci */
208c2ecf20Sopenharmony_ci#include <linux/gpio.h>
218c2ecf20Sopenharmony_ci#include <linux/if_ether.h>
228c2ecf20Sopenharmony_ci#include <linux/irq.h>
238c2ecf20Sopenharmony_ci#include <linux/serial.h>
248c2ecf20Sopenharmony_ci#include <linux/serial_8250.h>
258c2ecf20Sopenharmony_ci#include <linux/leds.h>
268c2ecf20Sopenharmony_ci#include <linux/reboot.h>
278c2ecf20Sopenharmony_ci#include <linux/i2c.h>
288c2ecf20Sopenharmony_ci#include <linux/gpio/machine.h>
298c2ecf20Sopenharmony_ci#include <linux/io.h>
308c2ecf20Sopenharmony_ci#include <asm/mach-types.h>
318c2ecf20Sopenharmony_ci#include <asm/mach/arch.h>
328c2ecf20Sopenharmony_ci#include <asm/mach/flash.h>
338c2ecf20Sopenharmony_ci#include <asm/mach/time.h>
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci#include "irqs.h"
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci#define NSLU2_SDA_PIN		7
388c2ecf20Sopenharmony_ci#define NSLU2_SCL_PIN		6
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci/* NSLU2 Timer */
418c2ecf20Sopenharmony_ci#define NSLU2_FREQ 66000000
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci/* Buttons */
448c2ecf20Sopenharmony_ci#define NSLU2_PB_GPIO		5	/* power button */
458c2ecf20Sopenharmony_ci#define NSLU2_PO_GPIO		8	/* power off */
468c2ecf20Sopenharmony_ci#define NSLU2_RB_GPIO		12	/* reset button */
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci/* Buzzer */
498c2ecf20Sopenharmony_ci#define NSLU2_GPIO_BUZZ		4
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci/* LEDs */
528c2ecf20Sopenharmony_ci#define NSLU2_LED_RED_GPIO	0
538c2ecf20Sopenharmony_ci#define NSLU2_LED_GRN_GPIO	1
548c2ecf20Sopenharmony_ci#define NSLU2_LED_DISK1_GPIO	3
558c2ecf20Sopenharmony_ci#define NSLU2_LED_DISK2_GPIO	2
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_cistatic struct flash_platform_data nslu2_flash_data = {
588c2ecf20Sopenharmony_ci	.map_name		= "cfi_probe",
598c2ecf20Sopenharmony_ci	.width			= 2,
608c2ecf20Sopenharmony_ci};
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_cistatic struct resource nslu2_flash_resource = {
638c2ecf20Sopenharmony_ci	.flags			= IORESOURCE_MEM,
648c2ecf20Sopenharmony_ci};
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_cistatic struct platform_device nslu2_flash = {
678c2ecf20Sopenharmony_ci	.name			= "IXP4XX-Flash",
688c2ecf20Sopenharmony_ci	.id			= 0,
698c2ecf20Sopenharmony_ci	.dev.platform_data	= &nslu2_flash_data,
708c2ecf20Sopenharmony_ci	.num_resources		= 1,
718c2ecf20Sopenharmony_ci	.resource		= &nslu2_flash_resource,
728c2ecf20Sopenharmony_ci};
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_cistatic struct gpiod_lookup_table nslu2_i2c_gpiod_table = {
758c2ecf20Sopenharmony_ci	.dev_id		= "i2c-gpio.0",
768c2ecf20Sopenharmony_ci	.table		= {
778c2ecf20Sopenharmony_ci		GPIO_LOOKUP_IDX("IXP4XX_GPIO_CHIP", NSLU2_SDA_PIN,
788c2ecf20Sopenharmony_ci				NULL, 0, GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
798c2ecf20Sopenharmony_ci		GPIO_LOOKUP_IDX("IXP4XX_GPIO_CHIP", NSLU2_SCL_PIN,
808c2ecf20Sopenharmony_ci				NULL, 1, GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
818c2ecf20Sopenharmony_ci	},
828c2ecf20Sopenharmony_ci};
838c2ecf20Sopenharmony_ci
848c2ecf20Sopenharmony_cistatic struct i2c_board_info __initdata nslu2_i2c_board_info [] = {
858c2ecf20Sopenharmony_ci	{
868c2ecf20Sopenharmony_ci		I2C_BOARD_INFO("x1205", 0x6f),
878c2ecf20Sopenharmony_ci	},
888c2ecf20Sopenharmony_ci};
898c2ecf20Sopenharmony_ci
908c2ecf20Sopenharmony_cistatic struct gpio_led nslu2_led_pins[] = {
918c2ecf20Sopenharmony_ci	{
928c2ecf20Sopenharmony_ci		.name		= "nslu2:green:ready",
938c2ecf20Sopenharmony_ci		.gpio		= NSLU2_LED_GRN_GPIO,
948c2ecf20Sopenharmony_ci	},
958c2ecf20Sopenharmony_ci	{
968c2ecf20Sopenharmony_ci		.name		= "nslu2:red:status",
978c2ecf20Sopenharmony_ci		.gpio		= NSLU2_LED_RED_GPIO,
988c2ecf20Sopenharmony_ci	},
998c2ecf20Sopenharmony_ci	{
1008c2ecf20Sopenharmony_ci		.name		= "nslu2:green:disk-1",
1018c2ecf20Sopenharmony_ci		.gpio		= NSLU2_LED_DISK1_GPIO,
1028c2ecf20Sopenharmony_ci		.active_low	= true,
1038c2ecf20Sopenharmony_ci	},
1048c2ecf20Sopenharmony_ci	{
1058c2ecf20Sopenharmony_ci		.name		= "nslu2:green:disk-2",
1068c2ecf20Sopenharmony_ci		.gpio		= NSLU2_LED_DISK2_GPIO,
1078c2ecf20Sopenharmony_ci		.active_low	= true,
1088c2ecf20Sopenharmony_ci	},
1098c2ecf20Sopenharmony_ci};
1108c2ecf20Sopenharmony_ci
1118c2ecf20Sopenharmony_cistatic struct gpio_led_platform_data nslu2_led_data = {
1128c2ecf20Sopenharmony_ci	.num_leds		= ARRAY_SIZE(nslu2_led_pins),
1138c2ecf20Sopenharmony_ci	.leds			= nslu2_led_pins,
1148c2ecf20Sopenharmony_ci};
1158c2ecf20Sopenharmony_ci
1168c2ecf20Sopenharmony_cistatic struct platform_device nslu2_leds = {
1178c2ecf20Sopenharmony_ci	.name			= "leds-gpio",
1188c2ecf20Sopenharmony_ci	.id			= -1,
1198c2ecf20Sopenharmony_ci	.dev.platform_data	= &nslu2_led_data,
1208c2ecf20Sopenharmony_ci};
1218c2ecf20Sopenharmony_ci
1228c2ecf20Sopenharmony_cistatic struct platform_device nslu2_i2c_gpio = {
1238c2ecf20Sopenharmony_ci	.name			= "i2c-gpio",
1248c2ecf20Sopenharmony_ci	.id			= 0,
1258c2ecf20Sopenharmony_ci	.dev	 = {
1268c2ecf20Sopenharmony_ci		.platform_data	= NULL,
1278c2ecf20Sopenharmony_ci	},
1288c2ecf20Sopenharmony_ci};
1298c2ecf20Sopenharmony_ci
1308c2ecf20Sopenharmony_cistatic struct resource nslu2_beeper_resources[] = {
1318c2ecf20Sopenharmony_ci	{
1328c2ecf20Sopenharmony_ci		.start	= IRQ_IXP4XX_TIMER2,
1338c2ecf20Sopenharmony_ci		.flags	= IORESOURCE_IRQ,
1348c2ecf20Sopenharmony_ci	},
1358c2ecf20Sopenharmony_ci};
1368c2ecf20Sopenharmony_ci
1378c2ecf20Sopenharmony_cistatic struct platform_device nslu2_beeper = {
1388c2ecf20Sopenharmony_ci	.name			= "ixp4xx-beeper",
1398c2ecf20Sopenharmony_ci	.id			= NSLU2_GPIO_BUZZ,
1408c2ecf20Sopenharmony_ci	.resource		= nslu2_beeper_resources,
1418c2ecf20Sopenharmony_ci	.num_resources		= ARRAY_SIZE(nslu2_beeper_resources),
1428c2ecf20Sopenharmony_ci};
1438c2ecf20Sopenharmony_ci
1448c2ecf20Sopenharmony_cistatic struct resource nslu2_uart_resources[] = {
1458c2ecf20Sopenharmony_ci	{
1468c2ecf20Sopenharmony_ci		.start		= IXP4XX_UART1_BASE_PHYS,
1478c2ecf20Sopenharmony_ci		.end		= IXP4XX_UART1_BASE_PHYS + 0x0fff,
1488c2ecf20Sopenharmony_ci		.flags		= IORESOURCE_MEM,
1498c2ecf20Sopenharmony_ci	},
1508c2ecf20Sopenharmony_ci	{
1518c2ecf20Sopenharmony_ci		.start		= IXP4XX_UART2_BASE_PHYS,
1528c2ecf20Sopenharmony_ci		.end		= IXP4XX_UART2_BASE_PHYS + 0x0fff,
1538c2ecf20Sopenharmony_ci		.flags		= IORESOURCE_MEM,
1548c2ecf20Sopenharmony_ci	}
1558c2ecf20Sopenharmony_ci};
1568c2ecf20Sopenharmony_ci
1578c2ecf20Sopenharmony_cistatic struct plat_serial8250_port nslu2_uart_data[] = {
1588c2ecf20Sopenharmony_ci	{
1598c2ecf20Sopenharmony_ci		.mapbase	= IXP4XX_UART1_BASE_PHYS,
1608c2ecf20Sopenharmony_ci		.membase	= (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
1618c2ecf20Sopenharmony_ci		.irq		= IRQ_IXP4XX_UART1,
1628c2ecf20Sopenharmony_ci		.flags		= UPF_BOOT_AUTOCONF,
1638c2ecf20Sopenharmony_ci		.iotype		= UPIO_MEM,
1648c2ecf20Sopenharmony_ci		.regshift	= 2,
1658c2ecf20Sopenharmony_ci		.uartclk	= IXP4XX_UART_XTAL,
1668c2ecf20Sopenharmony_ci	},
1678c2ecf20Sopenharmony_ci	{
1688c2ecf20Sopenharmony_ci		.mapbase	= IXP4XX_UART2_BASE_PHYS,
1698c2ecf20Sopenharmony_ci		.membase	= (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
1708c2ecf20Sopenharmony_ci		.irq		= IRQ_IXP4XX_UART2,
1718c2ecf20Sopenharmony_ci		.flags		= UPF_BOOT_AUTOCONF,
1728c2ecf20Sopenharmony_ci		.iotype		= UPIO_MEM,
1738c2ecf20Sopenharmony_ci		.regshift	= 2,
1748c2ecf20Sopenharmony_ci		.uartclk	= IXP4XX_UART_XTAL,
1758c2ecf20Sopenharmony_ci	},
1768c2ecf20Sopenharmony_ci	{ }
1778c2ecf20Sopenharmony_ci};
1788c2ecf20Sopenharmony_ci
1798c2ecf20Sopenharmony_cistatic struct platform_device nslu2_uart = {
1808c2ecf20Sopenharmony_ci	.name			= "serial8250",
1818c2ecf20Sopenharmony_ci	.id			= PLAT8250_DEV_PLATFORM,
1828c2ecf20Sopenharmony_ci	.dev.platform_data	= nslu2_uart_data,
1838c2ecf20Sopenharmony_ci	.num_resources		= 2,
1848c2ecf20Sopenharmony_ci	.resource		= nslu2_uart_resources,
1858c2ecf20Sopenharmony_ci};
1868c2ecf20Sopenharmony_ci
1878c2ecf20Sopenharmony_ci/* Built-in 10/100 Ethernet MAC interfaces */
1888c2ecf20Sopenharmony_cistatic struct resource nslu2_eth_resources[] = {
1898c2ecf20Sopenharmony_ci	{
1908c2ecf20Sopenharmony_ci		.start		= IXP4XX_EthB_BASE_PHYS,
1918c2ecf20Sopenharmony_ci		.end		= IXP4XX_EthB_BASE_PHYS + 0x0fff,
1928c2ecf20Sopenharmony_ci		.flags		= IORESOURCE_MEM,
1938c2ecf20Sopenharmony_ci	},
1948c2ecf20Sopenharmony_ci};
1958c2ecf20Sopenharmony_ci
1968c2ecf20Sopenharmony_cistatic struct eth_plat_info nslu2_plat_eth[] = {
1978c2ecf20Sopenharmony_ci	{
1988c2ecf20Sopenharmony_ci		.phy		= 1,
1998c2ecf20Sopenharmony_ci		.rxq		= 3,
2008c2ecf20Sopenharmony_ci		.txreadyq	= 20,
2018c2ecf20Sopenharmony_ci	}
2028c2ecf20Sopenharmony_ci};
2038c2ecf20Sopenharmony_ci
2048c2ecf20Sopenharmony_cistatic struct platform_device nslu2_eth[] = {
2058c2ecf20Sopenharmony_ci	{
2068c2ecf20Sopenharmony_ci		.name			= "ixp4xx_eth",
2078c2ecf20Sopenharmony_ci		.id			= IXP4XX_ETH_NPEB,
2088c2ecf20Sopenharmony_ci		.dev.platform_data	= nslu2_plat_eth,
2098c2ecf20Sopenharmony_ci		.num_resources		= ARRAY_SIZE(nslu2_eth_resources),
2108c2ecf20Sopenharmony_ci		.resource		= nslu2_eth_resources,
2118c2ecf20Sopenharmony_ci	}
2128c2ecf20Sopenharmony_ci};
2138c2ecf20Sopenharmony_ci
2148c2ecf20Sopenharmony_cistatic struct platform_device *nslu2_devices[] __initdata = {
2158c2ecf20Sopenharmony_ci	&nslu2_i2c_gpio,
2168c2ecf20Sopenharmony_ci	&nslu2_flash,
2178c2ecf20Sopenharmony_ci	&nslu2_beeper,
2188c2ecf20Sopenharmony_ci	&nslu2_leds,
2198c2ecf20Sopenharmony_ci	&nslu2_eth[0],
2208c2ecf20Sopenharmony_ci};
2218c2ecf20Sopenharmony_ci
2228c2ecf20Sopenharmony_cistatic void nslu2_power_off(void)
2238c2ecf20Sopenharmony_ci{
2248c2ecf20Sopenharmony_ci	/* This causes the box to drop the power and go dead. */
2258c2ecf20Sopenharmony_ci
2268c2ecf20Sopenharmony_ci	/* enable the pwr cntl gpio and assert power off */
2278c2ecf20Sopenharmony_ci	gpio_direction_output(NSLU2_PO_GPIO, 1);
2288c2ecf20Sopenharmony_ci}
2298c2ecf20Sopenharmony_ci
2308c2ecf20Sopenharmony_cistatic irqreturn_t nslu2_power_handler(int irq, void *dev_id)
2318c2ecf20Sopenharmony_ci{
2328c2ecf20Sopenharmony_ci	/* Signal init to do the ctrlaltdel action, this will bypass init if
2338c2ecf20Sopenharmony_ci	 * it hasn't started and do a kernel_restart.
2348c2ecf20Sopenharmony_ci	 */
2358c2ecf20Sopenharmony_ci	ctrl_alt_del();
2368c2ecf20Sopenharmony_ci
2378c2ecf20Sopenharmony_ci	return IRQ_HANDLED;
2388c2ecf20Sopenharmony_ci}
2398c2ecf20Sopenharmony_ci
2408c2ecf20Sopenharmony_cistatic irqreturn_t nslu2_reset_handler(int irq, void *dev_id)
2418c2ecf20Sopenharmony_ci{
2428c2ecf20Sopenharmony_ci	/* This is the paper-clip reset, it shuts the machine down directly.
2438c2ecf20Sopenharmony_ci	 */
2448c2ecf20Sopenharmony_ci	machine_power_off();
2458c2ecf20Sopenharmony_ci
2468c2ecf20Sopenharmony_ci	return IRQ_HANDLED;
2478c2ecf20Sopenharmony_ci}
2488c2ecf20Sopenharmony_ci
2498c2ecf20Sopenharmony_cistatic int __init nslu2_gpio_init(void)
2508c2ecf20Sopenharmony_ci{
2518c2ecf20Sopenharmony_ci	if (!machine_is_nslu2())
2528c2ecf20Sopenharmony_ci		return 0;
2538c2ecf20Sopenharmony_ci
2548c2ecf20Sopenharmony_ci	/* Request the power off GPIO */
2558c2ecf20Sopenharmony_ci	return gpio_request(NSLU2_PO_GPIO, "power off");
2568c2ecf20Sopenharmony_ci}
2578c2ecf20Sopenharmony_cidevice_initcall(nslu2_gpio_init);
2588c2ecf20Sopenharmony_ci
2598c2ecf20Sopenharmony_cistatic void __init nslu2_timer_init(void)
2608c2ecf20Sopenharmony_ci{
2618c2ecf20Sopenharmony_ci    /* The xtal on this machine is non-standard. */
2628c2ecf20Sopenharmony_ci    ixp4xx_timer_freq = NSLU2_FREQ;
2638c2ecf20Sopenharmony_ci
2648c2ecf20Sopenharmony_ci    /* Call standard timer_init function. */
2658c2ecf20Sopenharmony_ci    ixp4xx_timer_init();
2668c2ecf20Sopenharmony_ci}
2678c2ecf20Sopenharmony_ci
2688c2ecf20Sopenharmony_cistatic void __init nslu2_init(void)
2698c2ecf20Sopenharmony_ci{
2708c2ecf20Sopenharmony_ci	uint8_t __iomem *f;
2718c2ecf20Sopenharmony_ci	int i;
2728c2ecf20Sopenharmony_ci
2738c2ecf20Sopenharmony_ci	ixp4xx_sys_init();
2748c2ecf20Sopenharmony_ci
2758c2ecf20Sopenharmony_ci	nslu2_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
2768c2ecf20Sopenharmony_ci	nslu2_flash_resource.end =
2778c2ecf20Sopenharmony_ci		IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
2788c2ecf20Sopenharmony_ci
2798c2ecf20Sopenharmony_ci	gpiod_add_lookup_table(&nslu2_i2c_gpiod_table);
2808c2ecf20Sopenharmony_ci	i2c_register_board_info(0, nslu2_i2c_board_info,
2818c2ecf20Sopenharmony_ci				ARRAY_SIZE(nslu2_i2c_board_info));
2828c2ecf20Sopenharmony_ci
2838c2ecf20Sopenharmony_ci	/*
2848c2ecf20Sopenharmony_ci	 * This is only useful on a modified machine, but it is valuable
2858c2ecf20Sopenharmony_ci	 * to have it first in order to see debug messages, and so that
2868c2ecf20Sopenharmony_ci	 * it does *not* get removed if platform_add_devices fails!
2878c2ecf20Sopenharmony_ci	 */
2888c2ecf20Sopenharmony_ci	(void)platform_device_register(&nslu2_uart);
2898c2ecf20Sopenharmony_ci
2908c2ecf20Sopenharmony_ci	platform_add_devices(nslu2_devices, ARRAY_SIZE(nslu2_devices));
2918c2ecf20Sopenharmony_ci
2928c2ecf20Sopenharmony_ci	pm_power_off = nslu2_power_off;
2938c2ecf20Sopenharmony_ci
2948c2ecf20Sopenharmony_ci	if (request_irq(gpio_to_irq(NSLU2_RB_GPIO), &nslu2_reset_handler,
2958c2ecf20Sopenharmony_ci		IRQF_TRIGGER_LOW, "NSLU2 reset button", NULL) < 0) {
2968c2ecf20Sopenharmony_ci
2978c2ecf20Sopenharmony_ci		printk(KERN_DEBUG "Reset Button IRQ %d not available\n",
2988c2ecf20Sopenharmony_ci			gpio_to_irq(NSLU2_RB_GPIO));
2998c2ecf20Sopenharmony_ci	}
3008c2ecf20Sopenharmony_ci
3018c2ecf20Sopenharmony_ci	if (request_irq(gpio_to_irq(NSLU2_PB_GPIO), &nslu2_power_handler,
3028c2ecf20Sopenharmony_ci		IRQF_TRIGGER_HIGH, "NSLU2 power button", NULL) < 0) {
3038c2ecf20Sopenharmony_ci
3048c2ecf20Sopenharmony_ci		printk(KERN_DEBUG "Power Button IRQ %d not available\n",
3058c2ecf20Sopenharmony_ci			gpio_to_irq(NSLU2_PB_GPIO));
3068c2ecf20Sopenharmony_ci	}
3078c2ecf20Sopenharmony_ci
3088c2ecf20Sopenharmony_ci	/*
3098c2ecf20Sopenharmony_ci	 * Map in a portion of the flash and read the MAC address.
3108c2ecf20Sopenharmony_ci	 * Since it is stored in BE in the flash itself, we need to
3118c2ecf20Sopenharmony_ci	 * byteswap it if we're in LE mode.
3128c2ecf20Sopenharmony_ci	 */
3138c2ecf20Sopenharmony_ci	f = ioremap(IXP4XX_EXP_BUS_BASE(0), 0x40000);
3148c2ecf20Sopenharmony_ci	if (f) {
3158c2ecf20Sopenharmony_ci		for (i = 0; i < 6; i++)
3168c2ecf20Sopenharmony_ci#ifdef __ARMEB__
3178c2ecf20Sopenharmony_ci			nslu2_plat_eth[0].hwaddr[i] = readb(f + 0x3FFB0 + i);
3188c2ecf20Sopenharmony_ci#else
3198c2ecf20Sopenharmony_ci			nslu2_plat_eth[0].hwaddr[i] = readb(f + 0x3FFB0 + (i^3));
3208c2ecf20Sopenharmony_ci#endif
3218c2ecf20Sopenharmony_ci		iounmap(f);
3228c2ecf20Sopenharmony_ci	}
3238c2ecf20Sopenharmony_ci	printk(KERN_INFO "NSLU2: Using MAC address %pM for port 0\n",
3248c2ecf20Sopenharmony_ci	       nslu2_plat_eth[0].hwaddr);
3258c2ecf20Sopenharmony_ci
3268c2ecf20Sopenharmony_ci}
3278c2ecf20Sopenharmony_ci
3288c2ecf20Sopenharmony_ciMACHINE_START(NSLU2, "Linksys NSLU2")
3298c2ecf20Sopenharmony_ci	/* Maintainer: www.nslu2-linux.org */
3308c2ecf20Sopenharmony_ci	.atag_offset	= 0x100,
3318c2ecf20Sopenharmony_ci	.map_io		= ixp4xx_map_io,
3328c2ecf20Sopenharmony_ci	.init_early	= ixp4xx_init_early,
3338c2ecf20Sopenharmony_ci	.init_irq	= ixp4xx_init_irq,
3348c2ecf20Sopenharmony_ci	.init_time	= nslu2_timer_init,
3358c2ecf20Sopenharmony_ci	.init_machine	= nslu2_init,
3368c2ecf20Sopenharmony_ci#if defined(CONFIG_PCI)
3378c2ecf20Sopenharmony_ci	.dma_zone_size	= SZ_64M,
3388c2ecf20Sopenharmony_ci#endif
3398c2ecf20Sopenharmony_ci	.restart	= ixp4xx_restart,
3408c2ecf20Sopenharmony_ciMACHINE_END
341