Skip to content

Commit

Permalink
ARM: shmobile: bockw: enable global use of FPGA
Browse files Browse the repository at this point in the history
This patch enables global use of FPGA,
since it will be used from many devices.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
  • Loading branch information
Kuninori Morimoto authored and Simon Horman committed Sep 30, 2013
1 parent 37bf810 commit 71d7472
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions arch/arm/mach-shmobile/board-bockw.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
#include <mach/r8a7778.h>
#include <asm/mach/arch.h>

#define FPGA 0x18200000
#define IRQ0MR 0x30
static void __iomem *fpga;

/*
* CN9(Upper side) SCIF/RCAN selection
*
Expand Down Expand Up @@ -224,8 +228,6 @@ static const struct pinctrl_map bockw_pinctrl_map[] = {
"vin1_data8", "vin1"),
};

#define FPGA 0x18200000
#define IRQ0MR 0x30
#define PFC 0xfffc0000
#define PUPR4 0x110
static void __init bockw_init(void)
Expand Down Expand Up @@ -269,19 +271,18 @@ static void __init bockw_init(void)


/* for SMSC */
base = ioremap_nocache(FPGA, SZ_1M);
if (base) {
fpga = ioremap_nocache(FPGA, SZ_1M);
if (fpga) {
/*
* CAUTION
*
* IRQ0/1 is cascaded interrupt from FPGA.
* it should be cared in the future
* Now, it is assuming IRQ0 was used only from SMSC.
*/
u16 val = ioread16(base + IRQ0MR);
u16 val = ioread16(fpga + IRQ0MR);
val &= ~(1 << 4); /* enable SMSC911x */
iowrite16(val, base + IRQ0MR);
iounmap(base);
iowrite16(val, fpga + IRQ0MR);

regulator_register_fixed(0, dummy_supplies,
ARRAY_SIZE(dummy_supplies));
Expand Down

0 comments on commit 71d7472

Please sign in to comment.