81157812bbbe6875781a7b66693fac5324688d89
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 #define COMPEX_GPIO_DEV_MASK (1 << ADM5120_GPIO_PIN5)
18 static void switch_bank_gpio5(unsigned bank
)
22 gpio_set_value(ADM5120_GPIO_PIN5
, 0);
25 gpio_set_value(ADM5120_GPIO_PIN5
, 1);
30 void __init
compex_mac_setup(void)
32 if (myloader_present()) {
35 for (i
= 0; i
< 6; i
++) {
36 if (is_valid_ether_addr(myloader_info
.macs
[i
]))
37 memcpy(myloader_info
.macs
[i
],
38 adm5120_eth_macs
[i
], ETH_ALEN
);
40 random_ether_addr(adm5120_eth_macs
[i
]);
45 random_ether_addr(mac
);
46 adm5120_setup_eth_macs(mac
);
50 void __init
compex_generic_setup(void)
52 gpio_request(ADM5120_GPIO_PIN5
, NULL
); /* for flash A20 line */
53 gpio_direction_output(ADM5120_GPIO_PIN5
, 0);
55 adm5120_flash0_data
.switch_bank
= switch_bank_gpio5
;
56 adm5120_add_device_flash(0);
58 adm5120_add_device_gpio(COMPEX_GPIO_DEV_MASK
);
This page took 0.050327 seconds and 3 git commands to generate.