Changeset 3639

Show
Ignore:
Timestamp:
06/12/02 04:29:54 (11 years ago)
Author:
mds
Message:

all but the export-objs part

On Fri, Jun 07, 2002 at 09:36:06AM -0400, Mark Studebaker wrote:

would you please respond to ticket 906 about the 8xx driver not compiling?
thanks

Okay. There's two problems. The attached patch deals with all of the
warnings and adds i2c-algo-8xx.o to the export-objs list. The second
one is that include/asm-ppc/commproc.h needs a small patch which I will
try and get into 2.4.19.

This is very lightly tested at the moment, but it seems OK.

--
Tom Rini (TR1265)
 http://gate.crashing.org/~trini/

Location:
i2c/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • i2c/trunk/CHANGES

    r3638 r3639  
    2121  i2c.h: Add defines for SMBus 2.0 
    2222  i2c-core.c: Beginnings of PEC; change back to 'old' CONFIG names 
    23   i2c-algo-8xx.[ch]: Add GPL 
     23  i2c-algo-8xx.[ch]: Compile updates, Add GPL 
    2424  i2c-id.h: Add driver ID for Savage 4, smbus-arp, smbus-alert, DS1307, 
    2525            SA-1110. 
    2626  i2c-proc.c: Check kmalloc() return code (sync with kernel 2.4.18) 
     27  i2c-rpx.c: Compile updates 
    2728  mkpatch: Change back to 'old' CONFIG names 
    2829  Makefiles: For 2.4+ kernels, modules now install in 
  • i2c/trunk/kernel/i2c-algo-8xx.c

    r3638 r3639  
    3939 
    4040#include <asm/mpc8xx.h> 
    41 #include "../../arch/ppc/8xx_io/commproc.h" 
     41#include <asm/commproc.h> 
    4242 
    4343#include <linux/i2c.h> 
     
    4949static ushort r_tbase, r_rbase; 
    5050 
    51 int cpm_scan = 0; 
     51int cpm_scan = 1; 
    5252int cpm_debug = 0; 
    5353 
    5454static void 
    55 cpm_iic_interrupt(void *dev_id) 
     55cpm_iic_interrupt(void *dev_id, void *regs) 
    5656{ 
    5757        volatile i2c8xx_t *i2c = (i2c8xx_t *)dev_id; 
     
    170170        iip->iic_rstate = 0; 
    171171        iip->iic_rdp = 0; 
    172         iip->iic_rbptr = 0; 
     172        iip->iic_rbptr = r_rbase; 
    173173        iip->iic_rbc = 0; 
    174174        iip->iic_rxtmp = 0; 
    175175        iip->iic_tstate = 0; 
    176176        iip->iic_tdp = 0; 
    177         iip->iic_tbptr = 0; 
     177        iip->iic_tbptr = r_tbase; 
    178178        iip->iic_tbc = 0; 
    179179        iip->iic_txtmp = 0; 
     
    233233        tb[0] = abyte;          /* Device address byte w/rw flag */ 
    234234 
    235         flush_dcache_range(tb, tb+1); 
     235        flush_dcache_range((unsigned long) tb, (unsigned long) (tb+1)); 
    236236 
    237237        if (cpm_debug) printk("cpm_iic_read(abyte=0x%x)\n", abyte); 
     
    247247        rbdf->cbd_sc = BD_SC_EMPTY | BD_SC_WRAP; 
    248248 
    249         invalidate_dcache_range(buf, buf+count); 
     249        invalidate_dcache_range((unsigned long) buf, (unsigned long) (buf+count)); 
    250250 
    251251        /* Chip bug, set enable here */ 
     
    288288 
    289289 
    290         invalidate_dcache_range(buf, buf+count); 
     290        invalidate_dcache_range((unsigned long) buf, (unsigned long) (buf+count)); 
    291291 
    292292        return count; 
     
    314314        *tb = abyte;            /* Device address byte w/rw flag */ 
    315315 
    316         flush_dcache_range(tb, tb+1); 
    317         flush_dcache_range(buf, buf+count); 
     316        flush_dcache_range((unsigned long) tb, (unsigned long) (tb+1)); 
     317        flush_dcache_range((unsigned long) buf, (unsigned long) (buf+count)); 
    318318 
    319319        if (cpm_debug) printk("cpm_iic_write(abyte=0x%x)\n", abyte); 
     
    397397        len = 2; 
    398398 
    399         flush_dcache_range(tb, tb+1); 
     399        flush_dcache_range((unsigned long) tb, (unsigned long) (tb+1)); 
    400400 
    401401        tbdf->cbd_bufaddr = __pa(tb); 
  • i2c/trunk/kernel/i2c-algo-8xx.h

    r3638 r3639  
    3232 
    3333        int     (*setisr) (int irq, 
    34                            void (*func)(int, void (*)(void *), void *), 
     34                           void (*func)(void *, void *), 
    3535                           void *data); 
    3636 
  • i2c/trunk/kernel/i2c-rpx.c

    r3578 r3639  
    77 * 
    88 * RPX lite specific parts of the i2c interface 
     9 * Update:  There actually isn't anything RPXLite-specific about this module. 
     10 * This should work for most any 8xx board.  The console messages have been  
     11 * changed to eliminate RPXLite references. 
    912 */ 
    1013 
     
    1720 
    1821#include <asm/mpc8xx.h> 
    19 #include "../../arch/ppc/8xx_io/commproc.h" 
     22#include <asm/commproc.h> 
    2023 
    2124#include <linux/i2c.h> 
     
    5659} 
    5760 
    58 static int rpx_install_isr(int irq, void (*func)(void *), void *data) 
     61static int rpx_install_isr(int irq, void (*func)(void *, void *), void *data) 
    5962{ 
    6063        /* install interrupt handler */ 
    61         cpm_install_handler(irq, func, data); 
     64        cpm_install_handler(irq, (void (*)(void *, struct pt_regs *)) func, data); 
    6265 
    6366        return 0; 
     
    9497 
    9598static struct i2c_adapter rpx_ops = { 
    96         "rpx", 
     99        "m8xx", 
    97100        I2C_HW_MPC8XX_EPON, 
    98101        NULL, 
     
    106109int __init i2c_rpx_init(void) 
    107110{ 
    108         printk("i2c-rpx.o: i2c RPX Lite module version %s (%s)\n", I2C_VERSION, I2C_DATE); 
     111        printk("i2c-rpx.o: i2c MPC8xx module version %s (%s)\n", I2C_VERSION, I2C_DATE); 
    109112 
    110113        /* reset hardware to sane state */ 
     
    126129#ifdef MODULE 
    127130MODULE_AUTHOR("Dan Malek <dmalek@jlc.net>"); 
    128 MODULE_DESCRIPTION("I2C-Bus adapter routines for EP RPX Lite"); 
     131MODULE_DESCRIPTION("I2C-Bus adapter routines for MPC8xx boards"); 
    129132 
    130133module_init(i2c_rpx_init);