aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/hp6xx/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boards/hp6xx/setup.c')
-rw-r--r--arch/sh/boards/hp6xx/setup.c54
1 files changed, 42 insertions, 12 deletions
diff --git a/arch/sh/boards/hp6xx/setup.c b/arch/sh/boards/hp6xx/setup.c
index 2f414ac3c69090..65a46fac744dca 100644
--- a/arch/sh/boards/hp6xx/setup.c
+++ b/arch/sh/boards/hp6xx/setup.c
@@ -21,7 +21,7 @@
#define SCPCR 0xa4000116
#define SCPDR 0xa4000136
-/* CF Slot */
+/* CF slot configured as storage */
static struct resource cf_ide_resources[] = {
[0] = {
.start = 0x15000000 + 0x1f0,
@@ -51,9 +51,21 @@ static struct platform_device jornadakbd_device = {
.id = -1,
};
+static struct platform_device hp6xxled_device = {
+ .name = "hp6xx-led",
+ .id = -1,
+};
+
+static struct platform_device jornadats_device = {
+ .name = "jornada_ts",
+ .id = -1,
+};
+
static struct platform_device *hp6xx_devices[] __initdata = {
&cf_ide_device,
&jornadakbd_device,
+ &jornadats_device,
+ &hp6xxled_device,
};
static void __init hp6xx_init_irq(void)
@@ -73,23 +85,25 @@ static void __init hp6xx_setup(char **cmdline_p)
u16 v;
v = inw(HD64461_STBCR);
- v |= HD64461_STBCR_SURTST | HD64461_STBCR_SIRST |
- HD64461_STBCR_STM1ST | HD64461_STBCR_STM0ST |
- HD64461_STBCR_SAFEST | HD64461_STBCR_SPC0ST |
- HD64461_STBCR_SMIAST | HD64461_STBCR_SAFECKE_OST|
+ v |= HD64461_STBCR_SURTST | HD64461_STBCR_SIRST |
+ HD64461_STBCR_STM1ST | HD64461_STBCR_STM0ST |
+ HD64461_STBCR_SAFEST | HD64461_STBCR_SPC0ST |
+ HD64461_STBCR_SMIAST | HD64461_STBCR_SAFECKE_OST|
HD64461_STBCR_SAFECKE_IST;
#ifndef CONFIG_HD64461_ENABLER
- v |= HD64461_STBCR_SPC1ST;
+ v |= HD6446x_STBCR_PCC1;
#endif
- outw(v, HD64461_STBCR);
- v = inw(HD64461_GPADR);
+ ctrl_outw(v, HD64461_STBCR);
+ v = ctrl_inw(HD64461_GPADR);
v |= HD64461_GPADR_SPEAKER | HD64461_GPADR_PCMCIA0;
- outw(v, HD64461_GPADR);
+ ctrl_outw(v, HD64461_GPADR);
- outw(HD64461_PCCGCR_VCC0 | HD64461_PCCSCR_VCC1, HD64461_PCC0GCR);
+ /* set voltage control pin to high level (PCC0SEL)*/
+ ctrl_outw(HD64461_PCCGCR_VCC0 | HD64461_PCCSCR_VCC1, HD64461_PCC0GCR);
#ifndef CONFIG_HD64461_ENABLER
- outw(HD64461_PCCGCR_VCC0 | HD64461_PCCSCR_VCC1, HD64461_PCC1GCR);
+ /* set voltage control pin to high level (PCC1SEL)*/
+ ctrl_outw(HD64461_PCCGCR_VCC0 | HD64461_PCCSCR_VCC1, HD64461_PCC1GCR);
#endif
sh_dac_output(0, DAC_SPEAKER_VOLUME);
@@ -107,15 +121,31 @@ static void __init hp6xx_setup(char **cmdline_p)
v &= ~SCPCR_TS_MASK;
v |= SCPCR_TS_ENABLE;
ctrl_outw(v, SCPCR);
+
}
device_initcall(hp6xx_devices_setup);
+static void __iomem *port_map(unsigned long port, unsigned int size)
+{
+ /* this is for all drivers actually accepting io_offset */
+ if (0xf300<=port && port<=0xf31f)
+ port = port - 0xf000;
+
+ /* non-port? then just return it */
+ if (PXSEG(port))
+ return (void __iomem *)(port);
+
+ /* add base value and return it */
+ return (void __iomem *)(0xba000000 + port);
+}
+
static struct sh_machine_vector mv_hp6xx __initmv = {
- .mv_name = "hp6xx",
+ .mv_name = "HP Jornada 6xx",
.mv_setup = hp6xx_setup,
/* IRQ's : CPU(64) + CCHIP(16) + FREE_TO_USE(6) */
.mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM + 6,
.mv_irq_demux = hd64461_irq_demux,
/* Enable IRQ0 -> IRQ3 in IRQ_MODE */
.mv_init_irq = hp6xx_init_irq,
+ .mv_ioport_map = port_map,
};