4 * Copyright (C) 2007-2008 Gabor Juhos <juhosg@openwrt.org>
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation.
14 #include <asm/mach-adm5120/prom/myloader.h>
16 static void switch_bank_gpio5(unsigned bank
)
20 gpio_set_value(ADM5120_GPIO_PIN5
, 0);
23 gpio_set_value(ADM5120_GPIO_PIN5
, 1);
28 void __init
compex_mac_setup(void)
30 if (myloader_present()) {
33 for (i
= 0; i
< 6; i
++) {
34 if (is_valid_ether_addr(myloader_info
.macs
[i
]))
35 memcpy(adm5120_eth_macs
[i
],
36 myloader_info
.macs
[i
], ETH_ALEN
);
38 random_ether_addr(adm5120_eth_macs
[i
]);
43 random_ether_addr(mac
);
44 adm5120_setup_eth_macs(mac
);
48 void __init
compex_generic_setup(void)
50 gpio_request(ADM5120_GPIO_PIN5
, NULL
); /* for flash A20 line */
51 gpio_direction_output(ADM5120_GPIO_PIN5
, 0);
53 adm5120_flash0_data
.switch_bank
= switch_bank_gpio5
;
54 adm5120_add_device_flash(0);
56 adm5120_add_device_uart(0);
57 adm5120_add_device_uart(1);