Changeset 7732


Ignore:
Timestamp:
2007-06-25T21:51:09+02:00 (9 years ago)
Author:
noz
Message:

Merge SSB driver from tree at bu3sch.de, pulled 24/6

Location:
trunk/target/linux/brcm47xx-2.6
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/brcm47xx-2.6/files/drivers/ssb/driver_chipcommon.c

    r7691 r7732  
    294294        /* set register for external IO to control LED. */ 
    295295        chipco_write32(cc, SSB_CHIPCO_PROG_CFG, 0x11); 
    296         tmp = ceildiv(10, ns) << SSB_PROG_WCNT_3_SHIFT;         /* Waitcount-3 = 10ns */ 
    297         tmp |= ceildiv(40, ns) << SSB_PROG_WCNT_1_SHIFT;        /* Waitcount-1 = 40ns */ 
    298         tmp |= ceildiv(240, ns);                                /* Waitcount-0 = 240ns */ 
     296        tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT;            /* Waitcount-3 = 10ns */ 
     297        tmp |= DIV_ROUND_UP(40, ns) << SSB_PROG_WCNT_1_SHIFT;   /* Waitcount-1 = 40ns */ 
     298        tmp |= DIV_ROUND_UP(240, ns);                           /* Waitcount-0 = 240ns */ 
    299299        chipco_write32(cc, SSB_CHIPCO_PROG_WAITCNT, tmp);       /* 0x01020a0c for a 100Mhz clock */ 
    300300 
    301301        /* Set timing for the flash */ 
    302         tmp = ceildiv(10, ns) << SSB_FLASH_WCNT_3_SHIFT;        /* Waitcount-3 = 10nS */ 
    303         tmp |= ceildiv(10, ns) << SSB_FLASH_WCNT_1_SHIFT;       /* Waitcount-1 = 10nS */ 
    304         tmp |= ceildiv(120, ns);                                /* Waitcount-0 = 120nS */ 
     302        tmp = DIV_ROUND_UP(10, ns) << SSB_FLASH_WCNT_3_SHIFT;   /* Waitcount-3 = 10nS */ 
     303        tmp |= DIV_ROUND_UP(10, ns) << SSB_FLASH_WCNT_1_SHIFT;  /* Waitcount-1 = 10nS */ 
     304        tmp |= DIV_ROUND_UP(120, ns);                           /* Waitcount-0 = 120nS */ 
    305305        if ((bus->chip_id == 0x5365) || 
    306306            (dev->id.revision < 9)) 
     
    313313        if (bus->chip_id == 0x5350) { 
    314314                /* Enable EXTIF */ 
    315                 tmp = ceildiv(10, ns) << SSB_PROG_WCNT_3_SHIFT;   /* Waitcount-3 = 10ns */ 
    316                 tmp |= ceildiv(20, ns) << SSB_PROG_WCNT_2_SHIFT;  /* Waitcount-2 = 20ns */ 
    317                 tmp |= ceildiv(100, ns) << SSB_PROG_WCNT_1_SHIFT; /* Waitcount-1 = 100ns */ 
    318                 tmp |= ceildiv(120, ns);                          /* Waitcount-0 = 120ns */ 
     315                tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT;      /* Waitcount-3 = 10ns */ 
     316                tmp |= DIV_ROUND_UP(20, ns) << SSB_PROG_WCNT_2_SHIFT;  /* Waitcount-2 = 20ns */ 
     317                tmp |= DIV_ROUND_UP(100, ns) << SSB_PROG_WCNT_1_SHIFT; /* Waitcount-1 = 100ns */ 
     318                tmp |= DIV_ROUND_UP(120, ns);                     /* Waitcount-0 = 120ns */ 
    319319                chipco_write32(cc, SSB_CHIPCO_PROG_WAITCNT, tmp); /* 0x01020a0c for a 100Mhz clock */ 
    320320        } 
  • trunk/target/linux/brcm47xx-2.6/files/drivers/ssb/main.c

    r7691 r7732  
    3333static LIST_HEAD(attach_queue); 
    3434static LIST_HEAD(buses); 
    35 static int nr_buses; 
     35static unsigned int next_busnumber; 
    3636static DEFINE_MUTEX(buses_mutex); 
    3737 
     
    366366                dev->bus = &ssb_bustype; 
    367367                snprintf(dev->bus_id, sizeof(dev->bus_id), 
    368                          "ssb%d:%d", bus->busnumber, dev_idx); 
     368                         "ssb%u:%d", bus->busnumber, dev_idx); 
    369369 
    370370                switch (bus->bustype) { 
     
    436436} 
    437437 
    438 static void ssb_get_boardtype(struct ssb_bus *bus) 
    439 {//FIXME for pcmcia? 
    440         if (bus->bustype != SSB_BUSTYPE_PCI) { 
    441                 /* Must set board_vendor, board_type and board_rev 
    442                  * before calling ssb_bus_*_register() */ 
    443                 assert(bus->board_vendor && bus->board_type); 
    444                 return; 
    445         } 
    446         ssb_pci_get_boardtype(bus); 
    447 } 
    448  
    449438static u16 ssb_ssb_read16(struct ssb_device *dev, u16 offset) 
    450439{ 
     
    486475}; 
    487476 
     477static int ssb_fetch_invariants(struct ssb_bus *bus, 
     478                                int (*get_invariants)(struct ssb_bus *bus, 
     479                                                      struct ssb_init_invariants *iv)) 
     480{ 
     481        struct ssb_init_invariants iv; 
     482        int err; 
     483 
     484        memset(&iv, 0, sizeof(iv)); 
     485        err = get_invariants(bus, &iv); 
     486        if (err) 
     487                goto out; 
     488        memcpy(&bus->boardinfo, &iv.boardinfo, sizeof(iv.boardinfo)); 
     489        memcpy(&bus->sprom, &iv.sprom, sizeof(iv.sprom)); 
     490out: 
     491        return err; 
     492} 
     493 
    488494static int ssb_bus_register(struct ssb_bus *bus, 
     495                            int (*get_invariants)(struct ssb_bus *bus, 
     496                                                  struct ssb_init_invariants *iv), 
    489497                            unsigned long baseaddr) 
    490498{ 
     
    494502        INIT_LIST_HEAD(&bus->list); 
    495503 
    496         ssb_get_boardtype(bus); 
    497504        /* Powerup the bus */ 
    498505        err = ssb_pci_xtal(bus, SSB_GPIO_XTAL | SSB_GPIO_PLL, 1); 
     
    500507                goto out; 
    501508        ssb_buses_lock(); 
    502         bus->busnumber = nr_buses; 
     509        bus->busnumber = next_busnumber; 
    503510        /* Scan for devices (cores) */ 
    504511        err = ssb_bus_scan(bus, baseaddr); 
     
    518525        ssb_chipcommon_init(&bus->chipco); 
    519526        ssb_mipscore_init(&bus->mipscore); 
     527        err = ssb_fetch_invariants(bus, get_invariants); 
     528        if (err) 
     529                goto err_pcmcia_exit; 
    520530 
    521531        /* Queue it for attach */ 
     
    527537                        goto err_dequeue; 
    528538        } 
    529         nr_buses++; 
     539        next_busnumber++; 
    530540        ssb_buses_unlock(); 
    531541 
     
    535545err_dequeue: 
    536546        list_del(&bus->list); 
    537 /* err_pcmcia_exit: */ 
     547err_pcmcia_exit: 
    538548/*      ssb_pcmcia_exit(bus); */ 
    539549err_pci_exit: 
     
    557567        bus->ops = &ssb_pci_ops; 
    558568 
    559         err = ssb_bus_register(bus, 0); 
     569        err = ssb_bus_register(bus, ssb_pci_get_invariants, 0); 
    560570        if (!err) { 
    561571                ssb_printk(KERN_INFO PFX "Sonics Silicon Backplane found on " 
     
    571581int ssb_bus_pcmciabus_register(struct ssb_bus *bus, 
    572582                               struct pcmcia_device *pcmcia_dev, 
    573                                unsigned long baseaddr, 
    574                                void (*fill_sprom)(struct ssb_sprom *sprom)) 
     583                               unsigned long baseaddr) 
    575584{ 
    576585        int err; 
     
    579588        bus->host_pcmcia = pcmcia_dev; 
    580589        bus->ops = &ssb_pcmcia_ops; 
    581         fill_sprom(&bus->sprom); 
    582  
    583         err = ssb_bus_register(bus, baseaddr); 
     590 
     591        err = ssb_bus_register(bus, ssb_pcmcia_get_invariants, baseaddr); 
    584592        if (!err) { 
    585593                ssb_printk(KERN_INFO PFX "Sonics Silicon Backplane found on " 
     
    594602int ssb_bus_ssbbus_register(struct ssb_bus *bus, 
    595603                            unsigned long baseaddr, 
    596                             void (*fill_sprom)(struct ssb_sprom *sprom)) 
     604                            int (*get_invariants)(struct ssb_bus *bus, 
     605                                                  struct ssb_init_invariants *iv)) 
    597606{ 
    598607        int err; 
     
    600609        bus->bustype = SSB_BUSTYPE_SSB; 
    601610        bus->ops = &ssb_ssb_ops; 
    602         fill_sprom(&bus->sprom); 
    603  
    604         err = ssb_bus_register(bus, baseaddr); 
     611 
     612        err = ssb_bus_register(bus, get_invariants, baseaddr); 
    605613        if (!err) { 
    606614                ssb_printk(KERN_INFO PFX "Sonics Silicon Backplane found at " 
  • trunk/target/linux/brcm47xx-2.6/files/drivers/ssb/pci.c

    r7691 r7732  
    331331        SPEX(gpio3, SSB_SPROM1_GPIOB, SSB_SPROM1_GPIOB_P3, 
    332332             SSB_SPROM1_GPIOB_P3_SHIFT); 
    333         SPEX(maxpwr_a, SSB_SPROM1_MAXPWR, SSB_SPROM1_MAXPWR_A, 0); 
    334         SPEX(maxpwr_bg, SSB_SPROM1_MAXPWR, SSB_SPROM1_MAXPWR_BG, 
    335              SSB_SPROM1_MAXPWR_BG_SHIFT); 
    336         SPEX(itssi_a, SSB_SPROM1_ITSSI, SSB_SPROM1_ITSSI_A, 0); 
    337         SPEX(itssi_bg, SSB_SPROM1_ITSSI, SSB_SPROM1_ITSSI_BG, 
    338              SSB_SPROM1_ITSSI_BG_SHIFT); 
     333        SPEX(maxpwr_a, SSB_SPROM1_MAXPWR, SSB_SPROM1_MAXPWR_A, 
     334             SSB_SPROM1_MAXPWR_A_SHIFT); 
     335        SPEX(maxpwr_bg, SSB_SPROM1_MAXPWR, SSB_SPROM1_MAXPWR_BG, 0); 
     336        SPEX(itssi_a, SSB_SPROM1_ITSSI, SSB_SPROM1_ITSSI_A, 
     337             SSB_SPROM1_ITSSI_A_SHIFT); 
     338        SPEX(itssi_bg, SSB_SPROM1_ITSSI, SSB_SPROM1_ITSSI_BG, 0); 
    339339        SPEX(boardflags_lo, SSB_SPROM1_BFLLO, 0xFFFF, 0); 
    340340        SPEX(antenna_gain_a, SSB_SPROM1_AGAIN, SSB_SPROM1_AGAIN_A, 0); 
     
    408408} 
    409409 
    410 static int sprom_extract(struct ssb_sprom *out, const u16 *in) 
     410static int sprom_extract(struct ssb_bus *bus, 
     411                         struct ssb_sprom *out, const u16 *in) 
    411412{ 
    412413        memset(out, 0, sizeof(*out)); 
     
    416417             SSB_SPROM_REVISION_CRC_SHIFT); 
    417418 
    418         if (out->revision == 0) 
    419                 goto unsupported; 
    420         if (out->revision >= 1 && out->revision <= 3) 
     419        if ((bus->chip_id & 0xFF00) == 0x4400) { 
     420                /* Workaround: The BCM44XX chip has a stupid revision 
     421                 * number stored in the SPROM. 
     422                 * Always extract r1. */ 
    421423                sprom_extract_r1(&out->r1, in); 
    422         if (out->revision >= 2 && out->revision <= 3) 
    423                 sprom_extract_r2(&out->r2, in); 
    424         if (out->revision == 3) 
    425                 sprom_extract_r3(&out->r3, in); 
    426         if (out->revision >= 4) 
    427                 goto unsupported; 
     424        } else { 
     425                if (out->revision == 0) 
     426                        goto unsupported; 
     427                if (out->revision >= 1 && out->revision <= 3) 
     428                        sprom_extract_r1(&out->r1, in); 
     429                if (out->revision >= 2 && out->revision <= 3) 
     430                        sprom_extract_r2(&out->r2, in); 
     431                if (out->revision == 3) 
     432                        sprom_extract_r3(&out->r3, in); 
     433                if (out->revision >= 4) 
     434                        goto unsupported; 
     435        } 
    428436 
    429437        return 0; 
     
    435443} 
    436444 
    437 int ssb_pci_sprom_get(struct ssb_bus *bus) 
     445static int ssb_pci_sprom_get(struct ssb_bus *bus, 
     446                             struct ssb_sprom *sprom) 
    438447{ 
    439448        int err = -ENOMEM; 
    440449        u16 *buf; 
    441  
    442         assert(bus->bustype == SSB_BUSTYPE_PCI); 
    443450 
    444451        buf = kcalloc(SSB_SPROMSIZE_WORDS, sizeof(u16), GFP_KERNEL); 
     
    451458                           "WARNING: Invalid SPROM CRC (corrupt SPROM)\n"); 
    452459        } 
    453         err = sprom_extract(&bus->sprom, buf); 
     460        err = sprom_extract(bus, sprom, buf); 
    454461 
    455462        kfree(buf); 
     
    458465} 
    459466 
    460 void ssb_pci_get_boardtype(struct ssb_bus *bus) 
     467static void ssb_pci_get_boardinfo(struct ssb_bus *bus, 
     468                                  struct ssb_boardinfo *bi) 
    461469{ 
    462470        pci_read_config_word(bus->host_pci, PCI_SUBSYSTEM_VENDOR_ID, 
    463                              &bus->board_vendor); 
     471                             &bi->vendor); 
    464472        pci_read_config_word(bus->host_pci, PCI_SUBSYSTEM_ID, 
    465                              &bus->board_type); 
     473                             &bi->type); 
    466474        pci_read_config_word(bus->host_pci, PCI_REVISION_ID, 
    467                              &bus->board_rev); 
     475                             &bi->rev); 
     476} 
     477 
     478int ssb_pci_get_invariants(struct ssb_bus *bus, 
     479                           struct ssb_init_invariants *iv) 
     480{ 
     481        int err; 
     482 
     483        err = ssb_pci_sprom_get(bus, &iv->sprom); 
     484        if (err) 
     485                goto out; 
     486        ssb_pci_get_boardinfo(bus, &iv->boardinfo); 
     487 
     488out: 
     489        return err; 
    468490} 
    469491 
     
    661683        if (err) 
    662684                goto out; 
    663         err = ssb_pci_sprom_get(bus); 
    664         if (err) 
    665                 goto err_remove_sprom_file; 
    666685 
    667686out: 
    668687        return err; 
    669 err_remove_sprom_file: 
    670         device_remove_file(&pdev->dev, &dev_attr_ssb_sprom); 
    671         return err; 
    672 } 
     688} 
  • trunk/target/linux/brcm47xx-2.6/files/drivers/ssb/pcmcia.c

    r6502 r7732  
    222222        .write32        = ssb_pcmcia_write32, 
    223223}; 
     224 
     225int ssb_pcmcia_get_invariants(struct ssb_bus *bus, 
     226                              struct ssb_init_invariants *iv) 
     227{ 
     228        //TODO 
     229        return 0; 
     230} 
    224231 
    225232int ssb_pcmcia_init(struct ssb_bus *bus) 
  • trunk/target/linux/brcm47xx-2.6/files/drivers/ssb/scan.c

    r7691 r7732  
    203203                break; 
    204204        case SSB_BUSTYPE_PCI: 
     205#ifdef CONFIG_SSB_PCIHOST 
    205206                pci_iounmap(bus->host_pci, bus->mmio); 
     207#else 
     208                assert(0); /* Can't reach this code. */ 
     209#endif 
    206210                break; 
    207211        } 
     
    223227                break; 
    224228        case SSB_BUSTYPE_PCI: 
     229#ifdef CONFIG_SSB_PCIHOST 
    225230                mmio = pci_iomap(bus->host_pci, 0, ~0UL); 
     231#else 
     232                assert(0); /* Can't reach this code. */ 
     233#endif 
    226234                break; 
    227235        } 
  • trunk/target/linux/brcm47xx-2.6/files/drivers/ssb/ssb_private.h

    r7691 r7732  
    5252extern int ssb_pci_xtal(struct ssb_bus *bus, u32 what, 
    5353                        int turn_on); 
    54 extern int ssb_pci_sprom_get(struct ssb_bus *bus); 
    55 extern void ssb_pci_get_boardtype(struct ssb_bus *bus); 
     54extern int ssb_pci_get_invariants(struct ssb_bus *bus, 
     55                                  struct ssb_init_invariants *iv); 
    5656extern void ssb_pci_exit(struct ssb_bus *bus); 
    5757extern int ssb_pci_init(struct ssb_bus *bus); 
     
    7575        return 0; 
    7676} 
    77 static inline int ssb_pci_sprom_get(struct ssb_bus *bus) 
    78 { 
    79         return 0; 
    80 } 
    81 static inline void ssb_pci_get_boardtype(struct ssb_bus *bus) 
    82 { 
    83 } 
    8477static inline void ssb_pci_exit(struct ssb_bus *bus) 
    8578{ 
     
    10093extern int ssb_pcmcia_switch_segment(struct ssb_bus *bus, 
    10194                                     u8 seg); 
     95extern int ssb_pcmcia_get_invariants(struct ssb_bus *bus, 
     96                                     struct ssb_init_invariants *iv); 
    10297extern int ssb_pcmcia_init(struct ssb_bus *bus); 
    10398extern const struct ssb_bus_ops ssb_pcmcia_ops; 
     
    140135#endif /* CONFIG_SSB_PCIHOST */ 
    141136 
    142  
    143 /* Ceiling division helper. Divides x by y. */ 
    144 static inline 
    145 unsigned long ceildiv(unsigned long x, unsigned long y) 
    146 { 
    147         return ((x + (y - 1)) / y); 
    148 } 
    149  
    150  
    151137#endif /* LINUX_SSB_PRIVATE_H_ */ 
  • trunk/target/linux/brcm47xx-2.6/files/include/linux/ssb/ssb.h

    r7691 r7732  
    101101}; 
    102102 
     103/* Information about the PCB the circuitry is soldered on. */ 
     104struct ssb_boardinfo { 
     105        u16 vendor; 
     106        u16 type; 
     107        u16 rev; 
     108}; 
     109 
    103110 
    104111struct ssb_device; 
     
    293300#endif 
    294301 
    295         /* ID information about the PCB. */ 
    296         u16 board_vendor; 
    297         u16 board_type; 
    298         u16 board_rev; 
    299302        /* ID information about the Chip. */ 
    300303        u16 chip_id; 
     
    302305        u8 chip_package; 
    303306 
    304         /* Contents of the SPROM. 
    305          * If there is no sprom (not on PCI-bus), this is emulated. */ 
    306         struct ssb_sprom sprom; 
    307  
    308307        /* List of devices (cores) on the backplane. */ 
    309308        struct ssb_device devices[SSB_MAX_NR_CORES]; 
     
    314313 
    315314        /* Software ID number for this bus. */ 
    316         int busnumber; 
     315        unsigned int busnumber; 
    317316 
    318317        /* The ChipCommon device (if available). */ 
     
    325324        struct ssb_extif extif; 
    326325 
     326        /* The following structure elements are not available in early 
     327         * SSB initialization. Though, they are available for regular 
     328         * registered drivers at any stage. So be careful when 
     329         * using them in the ssb core code. */ 
     330 
     331        /* ID information about the PCB. */ 
     332        struct ssb_boardinfo boardinfo; 
     333        /* Contents of the SPROM. */ 
     334        struct ssb_sprom sprom; 
     335 
    327336        /* Internal. */ 
    328337        struct list_head list; 
    329338}; 
    330339 
     340/* The initialization-invariants. */ 
     341struct ssb_init_invariants { 
     342        struct ssb_boardinfo boardinfo; 
     343        struct ssb_sprom sprom; 
     344}; 
     345 
     346/* Register a SSB system bus. get_invariants() is called after the 
     347 * basic system devices are initialized. 
     348 * The invariants are usually fetched from some NVRAM. 
     349 * Put the invariants into the struct pointed to by iv. */ 
    331350extern int ssb_bus_ssbbus_register(struct ssb_bus *bus, 
    332351                                   unsigned long baseaddr, 
    333                                    void (*fill_sprom)(struct ssb_sprom *sprom)); 
     352                                   int (*get_invariants)(struct ssb_bus *bus, 
     353                                                         struct ssb_init_invariants *iv)); 
    334354#ifdef CONFIG_SSB_PCIHOST 
    335355extern int ssb_bus_pcibus_register(struct ssb_bus *bus, 
     
    339359extern int ssb_bus_pcmciabus_register(struct ssb_bus *bus, 
    340360                                      struct pcmcia_device *pcmcia_dev, 
    341                                       unsigned long baseaddr, 
    342                                       void (*fill_sprom)(struct ssb_sprom *sprom)); 
     361                                      unsigned long baseaddr); 
    343362#endif /* CONFIG_SSB_PCMCIAHOST */ 
    344363 
  • trunk/target/linux/brcm47xx-2.6/files/include/linux/ssb/ssb_regs.h

    r7691 r7732  
    202202#define  SSB_SPROM1_GPIOB_P3_SHIFT      8 
    203203#define SSB_SPROM1_MAXPWR               0x1068  /* Power Amplifier Max Power */ 
    204 #define  SSB_SPROM1_MAXPWR_A            0x00FF  /* A-PHY (in dBm Q5.2) */ 
    205 #define  SSB_SPROM1_MAXPWR_BG           0xFF00  /* B-PHY and G-PHY (in dBm Q5.2) */ 
    206 #define  SSB_SPROM1_MAXPWR_BG_SHIFT     8 
     204#define  SSB_SPROM1_MAXPWR_BG           0x00FF  /* B-PHY and G-PHY (in dBm Q5.2) */ 
     205#define  SSB_SPROM1_MAXPWR_A            0xFF00  /* A-PHY (in dBm Q5.2) */ 
     206#define  SSB_SPROM1_MAXPWR_A_SHIFT      8 
    207207#define SSB_SPROM1_PA1B0                0x106A 
    208208#define SSB_SPROM1_PA1B1                0x106C 
    209209#define SSB_SPROM1_PA1B2                0x106E 
    210210#define SSB_SPROM1_ITSSI                0x1070  /* Idle TSSI Target */ 
    211 #define  SSB_SPROM1_ITSSI_A             0x00FF  /* A-PHY */ 
    212 #define  SSB_SPROM1_ITSSI_BG            0xFF00  /* B-PHY and G-PHY */ 
    213 #define  SSB_SPROM1_ITSSI_BG_SHIFT      8 
     211#define  SSB_SPROM1_ITSSI_BG            0x00FF  /* B-PHY and G-PHY*/ 
     212#define  SSB_SPROM1_ITSSI_A             0xFF00  /* A-PHY */ 
     213#define  SSB_SPROM1_ITSSI_A_SHIFT       8 
    214214#define SSB_SPROM1_BFLLO                0x1072  /* Boardflags (low 16 bits) */ 
    215215#define SSB_SPROM1_AGAIN                0x1074  /* Antenna Gain (in dBm Q5.2) */ 
  • trunk/target/linux/brcm47xx-2.6/patches-2.6.22/210-ssb_merge.patch

    r7691 r7732  
    1 Index: linux-2.6.22-rc4/drivers/ssb/driver_chipcommon.c 
    2 =================================================================== 
    3 --- linux-2.6.22-rc4.orig/drivers/ssb/driver_chipcommon.c       2007-06-10 21:32:11.000000000 +0100 
    4 +++ linux-2.6.22-rc4/drivers/ssb/driver_chipcommon.c    2007-06-10 21:33:25.000000000 +0100 
     1Index: linux-2.6.22-rc5/drivers/ssb/driver_chipcommon.c 
     2=================================================================== 
     3--- linux-2.6.22-rc5.orig/drivers/ssb/driver_chipcommon.c       2007-06-21 23:04:38.000000000 +0100 
     4+++ linux-2.6.22-rc5/drivers/ssb/driver_chipcommon.c    2007-06-24 20:07:15.000000000 +0100 
    55@@ -264,6 +264,31 @@ 
    66        ssb_chipco_set_clockmode(cc, SSB_CLKMODE_FAST); 
     
    4949+} 
    5050+EXPORT_SYMBOL(ssb_chipco_watchdog); 
    51 Index: linux-2.6.22-rc4/drivers/ssb/driver_mipscore.c 
    52 =================================================================== 
    53 --- linux-2.6.22-rc4.orig/drivers/ssb/driver_mipscore.c 2007-06-10 21:32:11.000000000 +0100 
    54 +++ linux-2.6.22-rc4/drivers/ssb/driver_mipscore.c      2007-06-10 21:33:25.000000000 +0100 
     51Index: linux-2.6.22-rc5/drivers/ssb/driver_mipscore.c 
     52=================================================================== 
     53--- linux-2.6.22-rc5.orig/drivers/ssb/driver_mipscore.c 2007-06-10 16:44:31.000000000 +0100 
     54+++ linux-2.6.22-rc5/drivers/ssb/driver_mipscore.c      2007-06-24 20:48:52.000000000 +0100 
    5555@@ -4,6 +4,7 @@ 
    5656  * 
     
    117117+ 
    118118+       /* Set timing for the flash */ 
    119 +       tmp  = ceildiv(10, ns) << SSB_PROG_WCNT_3_SHIFT; 
    120 +       tmp |= ceildiv(40, ns) << SSB_PROG_WCNT_1_SHIFT; 
    121 +       tmp |= ceildiv(120, ns); 
     119+       tmp  = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT; 
     120+       tmp |= DIV_ROUND_UP(40, ns) << SSB_PROG_WCNT_1_SHIFT; 
     121+       tmp |= DIV_ROUND_UP(120, ns); 
    122122+       extif_write32(extif, SSB_EXTIF_PROG_WAITCNT, tmp); 
    123123+ 
    124124+       /* Set programmable interface timing for external uart */ 
    125 +       tmp  = ceildiv(10, ns) << SSB_PROG_WCNT_3_SHIFT; 
    126 +       tmp |= ceildiv(20, ns) << SSB_PROG_WCNT_2_SHIFT; 
    127 +       tmp |= ceildiv(100, ns) << SSB_PROG_WCNT_1_SHIFT; 
    128 +       tmp |= ceildiv(120, ns); 
     125+       tmp  = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT; 
     126+       tmp |= DIV_ROUND_UP(20, ns) << SSB_PROG_WCNT_2_SHIFT; 
     127+       tmp |= DIV_ROUND_UP(100, ns) << SSB_PROG_WCNT_1_SHIFT; 
     128+       tmp |= DIV_ROUND_UP(120, ns); 
    129129+       extif_write32(extif, SSB_EXTIF_PROG_WAITCNT, tmp); 
    130130+} 
     
    218218+ 
    219219+EXPORT_SYMBOL(ssb_mips_irq); 
    220 Index: linux-2.6.22-rc4/drivers/ssb/driver_pcicore.c 
    221 =================================================================== 
    222 --- linux-2.6.22-rc4.orig/drivers/ssb/driver_pcicore.c  2007-06-10 21:32:11.000000000 +0100 
    223 +++ linux-2.6.22-rc4/drivers/ssb/driver_pcicore.c       2007-06-10 21:33:25.000000000 +0100 
     220Index: linux-2.6.22-rc5/drivers/ssb/driver_pcicore.c 
     221=================================================================== 
     222--- linux-2.6.22-rc5.orig/drivers/ssb/driver_pcicore.c  2007-06-10 16:44:31.000000000 +0100 
     223+++ linux-2.6.22-rc5/drivers/ssb/driver_pcicore.c       2007-06-24 20:07:15.000000000 +0100 
    224224@@ -93,6 +93,9 @@ 
    225225  
     
    267267 } 
    268268  
    269 Index: linux-2.6.22-rc4/include/linux/ssb/ssb_driver_chipcommon.h 
    270 =================================================================== 
    271 --- linux-2.6.22-rc4.orig/include/linux/ssb/ssb_driver_chipcommon.h     2007-06-10 21:32:11.000000000 +0100 
    272 +++ linux-2.6.22-rc4/include/linux/ssb/ssb_driver_chipcommon.h  2007-06-10 21:33:25.000000000 +0100 
     269Index: linux-2.6.22-rc5/include/linux/ssb/ssb_driver_chipcommon.h 
     270=================================================================== 
     271--- linux-2.6.22-rc5.orig/include/linux/ssb/ssb_driver_chipcommon.h     2007-06-10 16:44:47.000000000 +0100 
     272+++ linux-2.6.22-rc5/include/linux/ssb/ssb_driver_chipcommon.h  2007-06-24 20:07:15.000000000 +0100 
    273273@@ -364,6 +364,8 @@ 
    274274 extern void ssb_chipco_suspend(struct ssb_chipcommon *cc, pm_message_t state); 
     
    327327 extern int ssb_chipco_serial_init(struct ssb_chipcommon *cc, 
    328328                                  struct ssb_serial_port *ports); 
    329 Index: linux-2.6.22-rc4/include/linux/ssb/ssb_driver_extif.h 
    330 =================================================================== 
    331 --- linux-2.6.22-rc4.orig/include/linux/ssb/ssb_driver_extif.h  2007-06-10 21:32:11.000000000 +0100 
    332 +++ linux-2.6.22-rc4/include/linux/ssb/ssb_driver_extif.h       2007-06-10 21:33:25.000000000 +0100 
     329Index: linux-2.6.22-rc5/include/linux/ssb/ssb_driver_extif.h 
     330=================================================================== 
     331--- linux-2.6.22-rc5.orig/include/linux/ssb/ssb_driver_extif.h  2007-06-10 16:44:47.000000000 +0100 
     332+++ linux-2.6.22-rc5/include/linux/ssb/ssb_driver_extif.h       2007-06-24 20:07:15.000000000 +0100 
    333333@@ -158,6 +158,36 @@ 
    334334 /* watchdog */ 
     
    368368 #endif /* __KERNEL__ */ 
    369369 #endif /* LINUX_SSB_EXTIFCORE_H_ */ 
    370 Index: linux-2.6.22-rc4/include/linux/ssb/ssb_driver_mips.h 
    371 =================================================================== 
    372 --- linux-2.6.22-rc4.orig/include/linux/ssb/ssb_driver_mips.h   2007-06-10 21:32:11.000000000 +0100 
    373 +++ linux-2.6.22-rc4/include/linux/ssb/ssb_driver_mips.h        2007-06-10 21:33:25.000000000 +0100 
     370Index: linux-2.6.22-rc5/include/linux/ssb/ssb_driver_mips.h 
     371=================================================================== 
     372--- linux-2.6.22-rc5.orig/include/linux/ssb/ssb_driver_mips.h   2007-06-10 16:44:47.000000000 +0100 
     373+++ linux-2.6.22-rc5/include/linux/ssb/ssb_driver_mips.h        2007-06-24 20:07:15.000000000 +0100 
    374374@@ -22,11 +22,13 @@ 
    375375        int nr_serial_ports; 
     
    386386 extern unsigned int ssb_mips_irq(struct ssb_device *dev); 
    387387  
    388 Index: linux-2.6.22-rc4/include/linux/ssb/ssb.h 
    389 =================================================================== 
    390 --- linux-2.6.22-rc4.orig/include/linux/ssb/ssb.h       2007-06-10 21:32:11.000000000 +0100 
    391 +++ linux-2.6.22-rc4/include/linux/ssb/ssb.h    2007-06-10 21:33:25.000000000 +0100 
    392 @@ -263,6 +263,12 @@ 
     388Index: linux-2.6.22-rc5/include/linux/ssb/ssb.h 
     389=================================================================== 
     390--- linux-2.6.22-rc5.orig/include/linux/ssb/ssb.h       2007-06-24 19:49:56.000000000 +0100 
     391+++ linux-2.6.22-rc5/include/linux/ssb/ssb.h    2007-06-24 20:07:15.000000000 +0100 
     392@@ -270,6 +270,12 @@ 
    393393 #define SSB_CHIPPACK_BCM4712M  2       /* Medium 225pin 4712 */ 
    394394 #define SSB_CHIPPACK_BCM4712L  0       /* Large 340pin 4712 */ 
     
    403403 #include <linux/ssb/ssb_driver_mips.h> 
    404404 #include <linux/ssb/ssb_driver_extif.h> 
    405 @@ -369,6 +375,16 @@ 
     405@@ -388,6 +394,16 @@ 
    406406        dev->ops->write32(dev, offset, value); 
    407407 } 
Note: See TracChangeset for help on using the changeset viewer.