Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57703
b: refs/heads/master
c: c362aec
h: refs/heads/master
i:
  57701: d50858e
  57699: cedfa3a
  57695: 9109e66
v: v3
  • Loading branch information
Ben Dooks authored and Russell King committed Jun 11, 2007
1 parent 9dc8cd3 commit ae321e4
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5d4cae5fe2ea1a0974962e2c49dca5c9c4b14cc0
refs/heads/master: c362aecdb51ecb364d427a9b947fd2dfbd4cb86a
18 changes: 14 additions & 4 deletions trunk/arch/arm/mach-s3c2440/mach-osiris.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ static struct map_desc osiris_iodesc[] __initdata = {
/* CPLD control registers */

{
.virtual = (u32)OSIRIS_VA_CTRL0,
.pfn = __phys_to_pfn(OSIRIS_PA_CTRL0),
.length = SZ_16K,
.type = MT_DEVICE,
}, {
.virtual = (u32)OSIRIS_VA_CTRL1,
.pfn = __phys_to_pfn(OSIRIS_PA_CTRL1),
.length = SZ_16K,
Expand All @@ -74,6 +79,11 @@ static struct map_desc osiris_iodesc[] __initdata = {
.pfn = __phys_to_pfn(OSIRIS_PA_CTRL2),
.length = SZ_16K,
.type = MT_DEVICE,
}, {
.virtual = (u32)OSIRIS_VA_IDREG,
.pfn = __phys_to_pfn(OSIRIS_PA_IDREG),
.length = SZ_16K,
.type = MT_DEVICE,
},
};

Expand Down Expand Up @@ -195,13 +205,13 @@ static void osiris_nand_select(struct s3c2410_nand_set *set, int slot)
pr_debug("osiris_nand: selecting slot %d (set %p,%p)\n",
slot, set, set->nr_map);

tmp = __raw_readb(OSIRIS_VA_CTRL1);
tmp &= ~OSIRIS_CTRL1_NANDSEL;
tmp = __raw_readb(OSIRIS_VA_CTRL0);
tmp &= ~OSIRIS_CTRL0_NANDSEL;
tmp |= slot;

pr_debug("osiris_nand: ctrl1 now %02x\n", tmp);
pr_debug("osiris_nand: ctrl0 now %02x\n", tmp);

__raw_writeb(tmp, OSIRIS_VA_CTRL1);
__raw_writeb(tmp, OSIRIS_VA_CTRL0);
}

static struct s3c2410_platform_nand osiris_nand_info = {
Expand Down
14 changes: 8 additions & 6 deletions trunk/include/asm-arm/arch-s3c2410/osiris-cpld.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@
#ifndef __ASM_ARCH_OSIRISCPLD_H
#define __ASM_ARCH_OSIRISCPLD_H

/* CTRL1 - NAND WP control */
/* CTRL0 - NAND WP control */

#define OSIRIS_CTRL1_NANDSEL (0x3)
#define OSIRIS_CTRL1_BOOT_INT (1<<3)
#define OSIRIS_CTRL1_PCMCIA (1<<4)
#define OSIRIS_CTRL1_PCMCIA_nWAIT (1<<6)
#define OSIRIS_CTRL1_PCMCIA_nIOIS16 (1<<7)
#define OSIRIS_CTRL0_NANDSEL (0x3)
#define OSIRIS_CTRL0_BOOT_INT (1<<3)
#define OSIRIS_CTRL0_PCMCIA (1<<4)
#define OSIRIS_CTRL0_PCMCIA_nWAIT (1<<6)
#define OSIRIS_CTRL0_PCMCIA_nIOIS16 (1<<7)

#define OSIRIS_ID_REVMASK (0x7)

#endif /* __ASM_ARCH_OSIRISCPLD_H */
19 changes: 11 additions & 8 deletions trunk/include/asm-arm/arch-s3c2410/osiris-map.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,19 @@

/* we put the CPLD registers next, to get them out of the way */

#define OSIRIS_VA_CTRL1 OSIRIS_IOADDR(0x00000000)
#define OSIRIS_PA_CTRL1 (OSIRIS_PA_CPLD)
#define OSIRIS_VA_CTRL0 OSIRIS_IOADDR(0x00000000)
#define OSIRIS_PA_CTRL0 (OSIRIS_PA_CPLD)

#define OSIRIS_VA_CTRL2 OSIRIS_IOADDR(0x00100000)
#define OSIRIS_PA_CTRL2 (OSIRIS_PA_CPLD + (1<<23))
#define OSIRIS_VA_CTRL1 OSIRIS_IOADDR(0x00100000)
#define OSIRIS_PA_CTRL1 (OSIRIS_PA_CPLD + (1<<23))

#define OSIRIS_VA_CTRL3 OSIRIS_IOADDR(0x00200000)
#define OSIRIS_PA_CTRL3 (OSIRIS_PA_CPLD + (2<<23))
#define OSIRIS_VA_CTRL2 OSIRIS_IOADDR(0x00200000)
#define OSIRIS_PA_CTRL2 (OSIRIS_PA_CPLD + (2<<23))

#define OSIRIS_VA_CTRL4 OSIRIS_IOADDR(0x00300000)
#define OSIRIS_PA_CTRL4 (OSIRIS_PA_CPLD + (3<<23))
#define OSIRIS_VA_CTRL3 OSIRIS_IOADDR(0x00300000)
#define OSIRIS_PA_CTRL3 (OSIRIS_PA_CPLD + (2<<23))

#define OSIRIS_VA_IDREG OSIRIS_IOADDR(0x00700000)
#define OSIRIS_PA_IDREG (OSIRIS_PA_CPLD + (7<<23))

#endif /* __ASM_ARCH_OSIRISMAP_H */

0 comments on commit ae321e4

Please sign in to comment.