Changeset 13488


Ignore:
Timestamp:
2008-12-02T22:17:31+01:00 (8 years ago)
Author:
juhosg
Message:

[ar71xx] update mips_machine stuff

Location:
trunk/target/linux/ar71xx
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c

    r13390 r13488  
    5959} 
    6060 
    61 MIPS_MACHINE(MACH_AR71XX_AP83, "Atheros AP83", ap83_setup); 
     61MIPS_MACHINE(AR71XX_MACH_AP83, "Atheros AP83", ap83_setup); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c

    r13278 r13488  
    3737} 
    3838 
    39 MIPS_MACHINE(MACH_AR71XX_AW_NR580, "AzureWave AW-NR580", aw_nr580_setup); 
     39MIPS_MACHINE(AR71XX_MACH_AW_NR580, "AzureWave AW-NR580", aw_nr580_setup); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-generic.c

    r12997 r13488  
    6767} 
    6868 
    69 MIPS_MACHINE(MACH_AR71XX_GENERIC, "Generic AR71xx board", ar71xx_generic_init); 
     69MIPS_MACHINE(AR71XX_MACH_GENERIC, "Generic AR71xx board", ar71xx_generic_init); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb-4xx.c

    r13199 r13488  
    174174} 
    175175 
    176 MIPS_MACHINE(MACH_AR71XX_RB_411, "MikroTik RouterBOARD 411/A/AH", rb411_setup); 
     176MIPS_MACHINE(AR71XX_MACH_RB_411, "MikroTik RouterBOARD 411/A/AH", rb411_setup); 
    177177 
    178178static void __init rb433_setup(void) 
     
    205205} 
    206206 
    207 MIPS_MACHINE(MACH_AR71XX_RB_433, "MikroTik RouterBOARD 433/AH", rb433_setup); 
     207MIPS_MACHINE(AR71XX_MACH_RB_433, "MikroTik RouterBOARD 433/AH", rb433_setup); 
    208208 
    209209static void __init rb450_setup(void) 
     
    234234} 
    235235 
    236 MIPS_MACHINE(MACH_AR71XX_RB_450, "MikroTik RouterBOARD 450", rb450_setup); 
     236MIPS_MACHINE(AR71XX_MACH_RB_450, "MikroTik RouterBOARD 450", rb450_setup); 
    237237 
    238238static void __init rb493_setup(void) 
     
    265265} 
    266266 
    267 MIPS_MACHINE(MACH_AR71XX_RB_493, "MikroTik RouterBOARD 493/AH", rb493_setup); 
    268  
     267MIPS_MACHINE(AR71XX_MACH_RB_493, "MikroTik RouterBOARD 493/AH", rb493_setup); 
     268 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c

    r13265 r13488  
    115115} 
    116116 
    117 MIPS_MACHINE(MACH_AR71XX_WP543, "Compex WP543", wp543_setup); 
     117MIPS_MACHINE(AR71XX_MACH_WP543, "Compex WP543", wp543_setup); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/platform.c

    r13376 r13488  
    570570        ar71xx_add_device_wdt(); 
    571571 
    572         mips_machine_setup(); 
     572        mips_machine_setup(ar71xx_mach_type); 
    573573        return 0; 
    574574} 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c

    r13356 r13488  
    3434        { 
    3535                .name           = "411", 
    36                 .mach_type      = MACH_AR71XX_RB_411, 
     36                .mach_type      = AR71XX_MACH_RB_411, 
    3737        }, { 
    3838                .name           = "433", 
    39                 .mach_type      = MACH_AR71XX_RB_433, 
     39                .mach_type      = AR71XX_MACH_RB_433, 
    4040        }, { 
    4141                .name           = "450", 
    42                 .mach_type      = MACH_AR71XX_RB_450, 
     42                .mach_type      = AR71XX_MACH_RB_450, 
    4343        }, { 
    4444                .name           = "493", 
    45                 .mach_type      = MACH_AR71XX_RB_493, 
     45                .mach_type      = AR71XX_MACH_RB_493, 
    4646        }, { 
    4747                .name           = "AW-NR580", 
    48                 .mach_type      = MACH_AR71XX_AW_NR580, 
     48                .mach_type      = AR71XX_MACH_AW_NR580, 
    4949        }, { 
    5050                .name           = "AP83", 
    51                 .mach_type      = MACH_AR71XX_AP83, 
     51                .mach_type      = AR71XX_MACH_AP83, 
    5252        } 
    5353}; 
     
    9797                        return boards[i].mach_type; 
    9898 
    99         return MACH_AR71XX_GENERIC; 
     99        return AR71XX_MACH_GENERIC; 
    100100} 
    101101 
     
    110110        switch (mylo->did) { 
    111111        case DEVID_COMPEX_WP543: 
    112                 mips_machtype = MACH_AR71XX_WP543; 
     112                ar71xx_mach_type = AR71XX_MACH_WP543; 
    113113                break; 
    114114        default: 
     
    133133                p = ar71xx_prom_getargv("board"); 
    134134        if (p) 
    135                 mips_machtype = find_board_byname(p); 
     135                ar71xx_mach_type = find_board_byname(p); 
    136136 
    137137        p = ar71xx_prom_getenv("ethaddr"); 
     
    149149                        (unsigned int)fw_arg2, (unsigned int)fw_arg3); 
    150150 
    151         mips_machtype = MACH_AR71XX_GENERIC; 
     151        ar71xx_mach_type = AR71XX_MACH_GENERIC; 
    152152 
    153153        if (ar71xx_prom_init_myloader()) 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/setup.c

    r13369 r13488  
    3636#define AR71XX_MEM_SIZE_MAX     0x8000000 
    3737 
     38unsigned long ar71xx_mach_type; 
     39 
    3840u32 ar71xx_cpu_freq; 
    3941EXPORT_SYMBOL_GPL(ar71xx_cpu_freq); 
  • trunk/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/ar71xx.h

    r13369 r13488  
    104104extern enum ar71xx_soc_type ar71xx_soc; 
    105105 
     106extern unsigned long ar71xx_mach_type; 
     107 
     108#define AR71XX_MACH_GENERIC     0 
     109#define AR71XX_MACH_WP543       1       /* Compex WP543 */ 
     110#define AR71XX_MACH_RB_411      2       /* MikroTik RouterBOARD 411/411A/411AH */ 
     111#define AR71XX_MACH_RB_433      3       /* MikroTik RouterBOARD 433/433AH */ 
     112#define AR71XX_MACH_RB_450      4       /* MikroTik RouterBOARD 450 */ 
     113#define AR71XX_MACH_RB_493      5       /* Mikrotik RouterBOARD 493/493AH */ 
     114#define AR71XX_MACH_AW_NR580    6       /* AzureWave AW-NR580 */ 
     115#define AR71XX_MACH_AP83        7       /* Atheros AP83 */ 
     116 
    106117/* 
    107118 * PLL block 
  • trunk/target/linux/ar71xx/patches-2.6.26/001-ar71xx_core.patch

    r13354 r13488  
    1515 cflags-y += -ffreestanding 
    1616  
    17 --- a/include/asm-mips/bootinfo.h 
    18 +++ b/include/asm-mips/bootinfo.h 
    19 @@ -79,6 +79,18 @@ 
    20  #define  MACH_LASAT_200                1       /* Masquerade PRO/SP200 */ 
    21   
    22  /* 
    23 + * Valid machtype for Atheros AR71xx based boards 
    24 + */ 
    25 +#define MACH_AR71XX_GENERIC    0 
    26 +#define MACH_AR71XX_WP543      1       /* Compex WP543 */ 
    27 +#define MACH_AR71XX_RB_411     2       /* MikroTik RouterBOARD 411/411A/411AH */ 
    28 +#define MACH_AR71XX_RB_433     3       /* MikroTik RouterBOARD 433/433AH */ 
    29 +#define MACH_AR71XX_RB_450     4       /* MikroTik RouterBOARD 450 */ 
    30 +#define MACH_AR71XX_RB_493     5       /* Mikrotik RouterBOARD 493/493AH */ 
    31 +#define MACH_AR71XX_AW_NR580   6       /* AzureWave AW-NR580 */ 
    32 +#define MACH_AR71XX_AP83       7       /* Atheros AP83 */ 
    33 + 
    34 +/* 
    35   * Valid machtype for group NEC EMMA2RH 
    36   */ 
    37  #define  MACH_NEC_MARKEINS     0       /* NEC EMMA2RH Mark-eins        */ 
    3817--- a/arch/mips/Kconfig 
    3918+++ b/arch/mips/Kconfig 
  • trunk/target/linux/ar71xx/patches-2.6.26/900-mips_multi_machine_support.patch

    r13135 r13488  
    11--- /dev/null 
    22+++ b/include/asm-mips/mips_machine.h 
    3 @@ -0,0 +1,49 @@ 
     3@@ -0,0 +1,47 @@ 
    44+/* 
    55+ *  Copyright (C) 2008 Gabor Juhos <juhosg@openwrt.org> 
     
    1717+#include <linux/list.h> 
    1818+ 
    19 +#include <asm/bootinfo.h> 
    20 + 
    2119+#define MIPS_MACHINE_NAME_LEN  64 
    2220+ 
     
    2927+ 
    3028+void mips_machine_register(struct mips_machine *) __init; 
    31 +void mips_machine_setup(void) __init; 
     29+void mips_machine_setup(unsigned long machtype) __init; 
    3230+ 
    3331+extern unsigned char mips_machine_name[MIPS_MACHINE_NAME_LEN]; 
     
    9189+} 
    9290+ 
    93 +void __init mips_machine_setup(void) 
     91+void __init mips_machine_setup(unsigned long machtype) 
    9492+{ 
    9593+       struct mips_machine *mach; 
    9694+ 
    97 +       mach = mips_machine_find(mips_machtype); 
     95+       mach = mips_machine_find(machtype); 
    9896+       if (!mach) { 
    9997+               printk(KERN_ALERT "MIPS: no machine registered for " 
    100 +                       "machtype %lu\n", mips_machtype); 
     98+                       "machtype %lu\n", machtype); 
    10199+               return; 
    102100+       } 
  • trunk/target/linux/ar71xx/patches-2.6.27/001-ar71xx_core.patch

    r13354 r13488  
    1515 cflags-y += -ffreestanding 
    1616  
    17 --- a/include/asm-mips/bootinfo.h 
    18 +++ b/include/asm-mips/bootinfo.h 
    19 @@ -57,6 +57,18 @@ 
    20  #define        MACH_MIKROTIK_RB532     0       /* Mikrotik RouterBoard 532     */ 
    21  #define MACH_MIKROTIK_RB532A   1       /* Mikrotik RouterBoard 532A    */ 
    22   
    23 +/* 
    24 + * Valid machtype for Atheros AR71xx based boards 
    25 + */ 
    26 +#define MACH_AR71XX_GENERIC    0 
    27 +#define MACH_AR71XX_WP543      1       /* Compex WP543 */ 
    28 +#define MACH_AR71XX_RB_411     2       /* MikroTik RouterBOARD 411/411A/411AH */ 
    29 +#define MACH_AR71XX_RB_433     3       /* MikroTik RouterBOARD 433/433AH */ 
    30 +#define MACH_AR71XX_RB_450     4       /* MikroTik RouterBOARD 450 */ 
    31 +#define MACH_AR71XX_RB_493     5       /* MikroTik RouterBOARD 493 */ 
    32 +#define MACH_AR71XX_AW_NR580   6       /* AzureWave AW-NR580 */ 
    33 +#define MACH_AR71XX_AP83       7       /* Atheros AP83 */ 
    34 + 
    35  #define CL_SIZE                        COMMAND_LINE_SIZE 
    36   
    37  extern char *system_type; 
    3817--- a/arch/mips/Kconfig 
    3918+++ b/arch/mips/Kconfig 
  • trunk/target/linux/ar71xx/patches-2.6.27/900-mips_multi_machine_support.patch

    r12988 r13488  
    11--- /dev/null 
    22+++ b/include/asm-mips/mips_machine.h 
    3 @@ -0,0 +1,49 @@ 
     3@@ -0,0 +1,47 @@ 
    44+/* 
    55+ *  Copyright (C) 2008 Gabor Juhos <juhosg@openwrt.org> 
     
    1717+#include <linux/list.h> 
    1818+ 
    19 +#include <asm/bootinfo.h> 
    20 + 
    2119+#define MIPS_MACHINE_NAME_LEN  64 
    2220+ 
     
    2927+ 
    3028+void mips_machine_register(struct mips_machine *) __init; 
    31 +void mips_machine_setup(void) __init; 
     29+void mips_machine_setup(unsigned long machtype) __init; 
    3230+ 
    3331+extern unsigned char mips_machine_name[MIPS_MACHINE_NAME_LEN]; 
     
    9189+} 
    9290+ 
    93 +void __init mips_machine_setup(void) 
     91+void __init mips_machine_setup(unsigned long machtype) 
    9492+{ 
    9593+       struct mips_machine *mach; 
    9694+ 
    97 +       mach = mips_machine_find(mips_machtype); 
     95+       mach = mips_machine_find(machtype); 
    9896+       if (!mach) { 
    9997+               printk(KERN_ALERT "MIPS: no machine registered for " 
    100 +                       "machtype %lu\n", mips_machtype); 
     98+                       "machtype %lu\n", machtype); 
    10199+               return; 
    102100+       } 
     
    114112--- a/arch/mips/kernel/Makefile 
    115113+++ b/arch/mips/kernel/Makefile 
    116 @@ -83,6 +83,7 @@ obj-$(CONFIG_GPIO_TXX9)               += gpio_txx9.o 
     114@@ -86,6 +86,7 @@ obj-$(CONFIG_GPIO_TXX9)               += gpio_txx9.o 
    117115  
    118116 obj-$(CONFIG_KEXEC)            += machine_kexec.o relocate_kernel.o 
     
    124122--- a/arch/mips/Kconfig 
    125123+++ b/arch/mips/Kconfig 
    126 @@ -789,6 +789,9 @@ config MYLOADER 
     124@@ -858,6 +858,9 @@ config MIPS_DISABLE_OBSOLETE_IDE 
    127125 config SYNC_R4K 
    128126        bool 
Note: See TracChangeset for help on using the changeset viewer.