~ubuntu-branches/ubuntu/maverick/uboot-imx/maverick

« back to all changes in this revision

Viewing changes to cpu/mpc512x/iopin.c

  • Committer: Bazaar Package Importer
  • Author(s): Oliver Grawert
  • Date: 2010-01-20 15:41:26 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100120154126-7bha1jeyjegu7xm5
Tags: 2009.08+really2009.01-0ubuntu1
* revert to the 2009.01 upstream version, 2009.08 has still to 
  many work in progress items in the freescale patchset (MMC and NIC
  dont work at all)
* add the latest patchset from freescale for 2009.01
* add 1002_enable_hush_shell_and_ext2.patch to enable hush shell and ext2 
* add 1003_fix_board_revision_numbers to make sure babbage 2.5 boards have 
  revision 51120 and babbage 3.0 boards have revision 51130 properly set in 
  their cpuinfo

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
#include <common.h>
25
25
#include <linux/types.h>
26
 
#include <asm/io.h>
 
26
#include <mpc512x.h>
27
27
 
28
28
void iopin_initialize(iopin_t *ioregs_init, int len)
29
29
{
30
30
        short i, j, p;
31
 
        u32 *reg;
 
31
        u_long *reg;
32
32
        immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
33
33
 
34
 
        reg = (u32 *)&(im->io_ctrl);
 
34
        reg = (u_long *)&(im->io_ctrl.regs[0]);
35
35
 
36
36
        if (sizeof(ioregs_init) == 0)
37
37
                return;
40
40
                for (p = 0, j = ioregs_init[i].p_offset / sizeof(u_long);
41
41
                        p < ioregs_init[i].nr_pins; p++, j++) {
42
42
                        if (ioregs_init[i].bit_or)
43
 
                                setbits_be32(reg + j, ioregs_init[i].val);
 
43
                                reg[j] |= ioregs_init[i].val;
44
44
                        else
45
 
                                out_be32 (reg + j, ioregs_init[i].val);
 
45
                                reg[j] = ioregs_init[i].val;
46
46
                }
47
47
        }
48
48
        return;