dns320l-setup.c
author andy
Fri, 06 Sep 2013 00:08:26 +0200
changeset 2 459c75093fd1
child 3 f2f1be1cc4ba
permissions -rw-r--r--
Update DNS320L support patch
2
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
     1
/*
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
     2
 * arch/arm/mach-kirkwood/dns320l-setup.c
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
     3
 *
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
     4
 * D-Link DNS-320L Setup File
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
     5
 *
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
     6
 * This file is licensed under the terms of the GNU General Public
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
     7
 * License version 2.  This program is licensed "as is" without any
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
     8
 * warranty of any kind, whether express or implied.
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
     9
 */
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    10
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    11
#include <linux/kernel.h>
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    12
#include <linux/init.h>
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    13
#include <linux/platform_device.h>
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    14
#include <linux/ata_platform.h>
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    15
#include <linux/mtd/partitions.h>
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    16
#include <linux/mv643xx_eth.h>
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    17
#include <linux/gpio.h>
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    18
#include <linux/leds.h>
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    19
#include <asm/mach-types.h>
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    20
#include <asm/mach/arch.h>
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    21
#include <mach/kirkwood.h>
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    22
#include "common.h"
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    23
#include "mpp.h"
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    24
#include <linux/sysfs.h>
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    25
#include <linux/kobject.h>
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    26
#include <linux/mtd/nand.h>
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    27
#include <linux/i2c.h>
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    28
#include <linux/gpio_keys.h>
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    29
#include <linux/gpio-fan.h>
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    30
#include <linux/input.h>
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    31
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    32
#define DNS320L_GPIO_LED_SATA1          20
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    33
#define DNS320L_GPIO_LED_SATA0          21
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    34
#define DNS320L_GPIO_POWER_SATA         24
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    35
#define DNS320L_GPIO_LED_USB_BLUE       25
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    36
#define DNS320L_GPIO_LED_USB_ORANGE     26
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    37
#define DNS320L_GPIO_BUTTON_USB         27
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    38
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    39
static struct mtd_partition dns320l_nand_parts[] = {
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    40
	{
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    41
		.name = "u-boot",
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    42
		.offset = 0,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    43
		.size = SZ_1M
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    44
	}, {
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    45
		.name = "uImage",
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    46
		.offset = MTDPART_OFS_NXTBLK,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    47
		.size = 5 * SZ_1M
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    48
	}, {
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    49
		.name = "ramdisk",
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    50
		.offset = MTDPART_OFS_NXTBLK,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    51
		.size = 5 * SZ_1M
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    52
	}, {
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    53
		.name = "image",
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    54
		.offset = MTDPART_OFS_NXTBLK,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    55
		.size = 100 * SZ_1M
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    56
	}, {
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    57
	    .name = "rescue firmware",
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    58
	    .offset = MTDPART_OFS_NXTBLK,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    59
	    .size = 10 * SZ_1M
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    60
	}, {
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    61
	    .name = "config",
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    62
	    .offset = MTDPART_OFS_NXTBLK,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    63
	    .size = 5 * SZ_1M
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    64
	}, {
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    65
	    .name = "my-dlink",
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    66
	    .offset = MTDPART_OFS_NXTBLK,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    67
	    .size = 2 * SZ_1M
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    68
	},
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    69
};
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    70
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    71
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    72
static struct mv643xx_eth_platform_data dns320l_ge00_data = {
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    73
	.phy_addr	= MV643XX_ETH_PHY_ADDR(0),
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    74
};
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    75
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    76
static struct mv_sata_platform_data dns320l_sata_data = {
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    77
	.n_ports	= 2,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    78
};
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    79
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    80
static void __init dns320l_gpio_register(unsigned gpio, char *name, int def)
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    81
{
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    82
	if (gpio_request(gpio, name) == 0 &&
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    83
	    gpio_direction_output(gpio, 0) == 0) {
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    84
		gpio_set_value(gpio, def);
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    85
		if (gpio_export(gpio, 0) != 0)
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    86
			pr_err("dns320l: Failed to export GPIO %s\n", name);
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    87
	} else
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    88
		pr_err("dns320l: Failed to register %s\n", name);
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    89
}
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    90
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    91
/*****************************************************************************
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    92
 * Buttons
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    93
 ****************************************************************************/
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    94
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    95
static struct gpio_keys_button dns320l_button_pins[] = {
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    96
	{
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    97
		.code		= KEY_EJECTCD,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    98
		.gpio		= DNS320L_GPIO_BUTTON_USB,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
    99
		.desc		= "USB unmount button",
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   100
		.active_low	= 1,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   101
	}
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   102
};
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   103
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   104
static struct gpio_keys_platform_data dns320l_button_data = {
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   105
	.buttons	= dns320l_button_pins,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   106
	.nbuttons	= ARRAY_SIZE(dns320l_button_pins),
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   107
};
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   108
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   109
static struct platform_device dns320l_button_device = {
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   110
	.name		= "gpio-keys",
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   111
	.id		= -1,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   112
	.num_resources	= 0,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   113
	.dev		= {
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   114
		.platform_data	= &dns320l_button_data,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   115
	}
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   116
};
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   117
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   118
/*****************************************************************************
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   119
 * LEDs
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   120
 ****************************************************************************/
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   121
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   122
static struct gpio_led dns320l_led_pins[] = {
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   123
	{
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   124
		.name	= "dns320l:blue:usb",
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   125
		.gpio	= DNS320L_GPIO_LED_USB_BLUE,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   126
		.default_trigger = "default-on",
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   127
	},
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   128
	{
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   129
		.name	= "dns320l:orange:usb",
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   130
		.gpio	= DNS320L_GPIO_LED_USB_ORANGE,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   131
	},
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   132
	{
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   133
	    .name   = "dns320l:blue:sata0",
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   134
	    .gpio   = DNS320L_GPIO_LED_SATA0,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   135
	    .default_trigger = "ide-disk"
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   136
	},
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   137
	{
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   138
	    .name   = "dns320l:blue:sata1",
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   139
	    .gpio   = DNS320L_GPIO_LED_SATA1,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   140
	    .default_trigger = "ide-disk"
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   141
	},
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   142
//	{
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   143
//	    .name   = "dns320l:blue:power",
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   144
//	    .gpio   = DNS320L_GPIO_LED_POWER,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   145
//	},
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   146
	
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   147
};
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   148
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   149
static struct gpio_led_platform_data dns320l_led_data = {
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   150
	.num_leds	= ARRAY_SIZE(dns320l_led_pins),
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   151
	.leds		= dns320l_led_pins,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   152
};
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   153
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   154
static struct platform_device dns320l_led_device = {
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   155
	.name		= "leds-gpio",
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   156
	.id		= -1,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   157
	.dev		= {
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   158
		.platform_data	= &dns320l_led_data,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   159
	},
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   160
};
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   161
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   162
/*****************************************************************************
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   163
 * Fan
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   164
 ****************************************************************************/
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   165
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   166
static unsigned int dns320l_mpp_config[] __initdata = {
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   167
    MPP13_UART1_TXD,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   168
	MPP14_UART1_RXD,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   169
	MPP16_GPIO,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   170
	MPP17_GPIO,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   171
	MPP18_GPO,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   172
	MPP19_GPO,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   173
	MPP20_GPIO,    // SATA LED
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   174
	MPP21_GPIO,    // SATA LED
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   175
	MPP24_GPIO,    // SATA Power
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   176
	MPP25_GPIO,    // USB LED Blue
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   177
	MPP26_GPIO,	   // USB LED Orange
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   178
	MPP27_GPIO,	   // Button USB Copy
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   179
	MPP28_GPIO,	
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   180
	MPP29_GPIO,	 
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   181
	MPP30_GPIO,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   182
	MPP31_GPIO,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   183
	MPP32_GPIO,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   184
	MPP33_GPO,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   185
	MPP34_GPIO,	
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   186
	MPP35_GPIO,	
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   187
	MPP36_GPIO,	
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   188
	MPP37_GPIO,	
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   189
	MPP38_GPIO,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   190
	MPP39_GPIO,	
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   191
	MPP40_GPIO,	
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   192
	MPP41_GPIO,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   193
	MPP42_GPIO,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   194
	MPP43_GPIO,	
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   195
	MPP44_GPIO,	
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   196
	MPP45_GPIO,	
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   197
	MPP46_GPIO,	
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   198
	MPP47_GPIO,	
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   199
	MPP48_GPIO,	
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   200
	MPP49_GPIO,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   201
	0
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   202
};
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   203
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   204
static void __init dns320l_init(void)
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   205
{
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   206
    /*
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   207
     * Basic setup. Needs to be called early.
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   208
     */
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   209
    
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   210
    kirkwood_init();
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   211
    /* setup gpio pin select */
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   212
    kirkwood_mpp_conf(dns320l_mpp_config);
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   213
    kirkwood_uart0_init();
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   214
    kirkwood_uart1_init();
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   215
    kirkwood_nand_init(ARRAY_AND_SIZE(dns320l_nand_parts), 60);
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   216
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   217
    kirkwood_ehci_init();
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   218
    kirkwood_i2c_init();
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   219
    kirkwood_ge00_init(&dns320l_ge00_data);
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   220
    platform_device_register(&dns320l_led_device);
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   221
	dns320l_gpio_register(DNS320L_GPIO_POWER_SATA, "dns320l:power:sata", 1);
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   222
    kirkwood_sata_init(&dns320l_sata_data);
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   223
    
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   224
    platform_device_register(&dns320l_button_device);
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   225
}
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   226
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   227
MACHINE_START(DNS320L, "DNS-320L")
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   228
	/* Maintainer: Andreas Boehler <andreas@aboehler.at> */
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   229
	.boot_params	= 0x00000100,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   230
	.init_machine	= dns320l_init,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   231
	.map_io		= kirkwood_map_io,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   232
	.init_early	= kirkwood_init_early,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   233
	.init_irq	= kirkwood_init_irq,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   234
	.timer		= &kirkwood_timer,
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   235
MACHINE_END
459c75093fd1 Update DNS320L support patch
andy
parents:
diff changeset
   236