···5# removes any old dependencies. DON'T put your own dependencies here6# unless it's something special (ie not a .c file).7#8-obj-y += irq.o prom.o reset.o setup.o
···5# removes any old dependencies. DON'T put your own dependencies here6# unless it's something special (ie not a .c file).7#8+obj-y += irq.o platform.o prom.o reset.o setup.o
···34extern unsigned long marvell_base;35extern unsigned long cpu_clock;3637-#ifdef CONFIG_MV643XX_ETH38-extern unsigned char prom_mac_addr_base[6];39-#endif40-41const char *get_system_type(void)42{43 return "Momentum Ocelot-3";44}45-46-#ifdef CONFIG_MV643XX_ETH47-void burn_clocks(void)48-{49- int i;50-51- /* this loop should burn at least 1us -- this should be plenty */52- for (i = 0; i < 0x10000; i++)53- ;54-}55-56-u8 exchange_bit(u8 val, u8 cs)57-{58- /* place the data */59- OCELOT_FPGA_WRITE((val << 2) | cs, EEPROM_MODE);60- burn_clocks();61-62- /* turn the clock on */63- OCELOT_FPGA_WRITE((val << 2) | cs | 0x2, EEPROM_MODE);64- burn_clocks();65-66- /* turn the clock off and read-strobe */67- OCELOT_FPGA_WRITE((val << 2) | cs | 0x10, EEPROM_MODE);68-69- /* return the data */70- return ((OCELOT_FPGA_READ(EEPROM_MODE) >> 3) & 0x1);71-}72-73-void get_mac(char dest[6])74-{75- u8 read_opcode[12] = {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};76- int i,j;77-78- for (i = 0; i < 12; i++)79- exchange_bit(read_opcode[i], 1);80-81- for (j = 0; j < 6; j++) {82- dest[j] = 0;83- for (i = 0; i < 8; i++) {84- dest[j] <<= 1;85- dest[j] |= exchange_bit(0, 1);86- }87- }88-89- /* turn off CS */90- exchange_bit(0,0);91-}92-#endif93-9495#ifdef CONFIG_64BIT96···174175 mips_machgroup = MACH_GROUP_MOMENCO;176 mips_machtype = MACH_MOMENCO_OCELOT_3;177-178-#ifdef CONFIG_MV643XX_ETH179- /* get the base MAC address for on-board ethernet ports */180- get_mac(prom_mac_addr_base);181-#endif182183#ifndef CONFIG_64BIT184 debug_vectors->printf("Booting Linux kernel...\n");
···34extern unsigned long marvell_base;35extern unsigned long cpu_clock;36000037const char *get_system_type(void)38{39 return "Momentum Ocelot-3";40}00000000000000000000000000000000000000000000000004142#ifdef CONFIG_64BIT43···227228 mips_machgroup = MACH_GROUP_MOMENCO;229 mips_machtype = MACH_MOMENCO_OCELOT_3;00000230231#ifndef CONFIG_64BIT232 debug_vectors->printf("Booting Linux kernel...\n");