summaryrefslogtreecommitdiff
path: root/sys/arch/arm
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-12-22 18:45:48 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-12-22 18:45:48 +0000
commit4989631d261c17f73332d333118276c85ce560fa (patch)
tree252d7d0fd610cec2722ffd9363fdd3dc3c053cf9 /sys/arch/arm
parent09e92cf34373fe3937d1262d90308058e79d44ba (diff)
do not do delay(HUGEVALUE) after enabling/disabling the lcd dma. yes, it
has a weird effect when you enable it and the backlight at the same time, but most people don't see it because they are flipping the lid open. and it is not actually weird, it is actually rather neat. ok miod
Diffstat (limited to 'sys/arch/arm')
-rw-r--r--sys/arch/arm/xscale/pxa2x0_lcd.c11
-rw-r--r--sys/arch/arm/xscale/pxa2x0_lcd.h4
-rw-r--r--sys/arch/arm/xscale/pxa2x0reg.h6
3 files changed, 10 insertions, 11 deletions
diff --git a/sys/arch/arm/xscale/pxa2x0_lcd.c b/sys/arch/arm/xscale/pxa2x0_lcd.c
index fd2d2b2d0bd..ebf19167fb0 100644
--- a/sys/arch/arm/xscale/pxa2x0_lcd.c
+++ b/sys/arch/arm/xscale/pxa2x0_lcd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_lcd.c,v 1.20 2005/09/15 20:23:10 miod Exp $ */
+/* $OpenBSD: pxa2x0_lcd.c,v 1.21 2005/12/22 18:45:46 deraadt Exp $ */
/* $NetBSD: pxa2x0_lcd.c,v 1.8 2003/10/03 07:24:05 bsh Exp $ */
/*
@@ -89,8 +89,6 @@ void pxa2x0_lcd_setup_rasops(struct rasops_info *,
void pxa2x0_lcd_start_dma(bus_space_tag_t, bus_space_handle_t,
struct pxa2x0_lcd_screen *);
void pxa2x0_lcd_stop_dma(bus_space_tag_t, bus_space_handle_t);
-void pxa2x0_lcd_suspend(struct pxa2x0_lcd_softc *);
-void pxa2x0_lcd_resume(struct pxa2x0_lcd_softc *);
/*
* Setup display geometry parameters.
@@ -191,8 +189,7 @@ pxa2x0_lcd_initialize(bus_space_tag_t iot, bus_space_handle_t ioh,
LCDPANEL_DUAL)) {
/* active and color dual panel need L_DD[15:0] */
nldd = 16;
- } else
- if ((geom->panel_info & LCDPANEL_DUAL) ||
+ } else if ((geom->panel_info & LCDPANEL_DUAL) ||
!(geom->panel_info & LCDPANEL_MONOCHROME)) {
/* dual or color need L_DD[7:0] */
nldd = 8;
@@ -827,8 +824,8 @@ pxa2x0_lcd_suspend(struct pxa2x0_lcd_softc *sc)
if (sc->active != NULL) {
pxa2x0_lcd_stop_dma(sc->iot, sc->ioh);
+
pxa2x0_clkman_config(CKEN_LCD, 0);
- delay(1000000); /* XXX */
}
}
@@ -840,8 +837,6 @@ pxa2x0_lcd_resume(struct pxa2x0_lcd_softc *sc)
pxa2x0_lcd_initialize(sc->iot, sc->ioh, sc->geometry,
pxa2x0_clkman_config);
pxa2x0_lcd_start_dma(sc->iot, sc->ioh, sc->active);
- /* XXX wait here to avoid a weird fade-in effect. */
- delay(1000000);
}
}
diff --git a/sys/arch/arm/xscale/pxa2x0_lcd.h b/sys/arch/arm/xscale/pxa2x0_lcd.h
index 221769c0238..84b7a51ecaf 100644
--- a/sys/arch/arm/xscale/pxa2x0_lcd.h
+++ b/sys/arch/arm/xscale/pxa2x0_lcd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_lcd.h,v 1.10 2005/09/15 20:23:10 miod Exp $ */
+/* $OpenBSD: pxa2x0_lcd.h,v 1.11 2005/12/22 18:45:46 deraadt Exp $ */
/* $NetBSD: pxa2x0_lcd.h,v 1.2 2003/06/17 09:43:14 bsh Exp $ */
/*
* Copyright (c) 2002 Genetec Corporation. All rights reserved.
@@ -142,5 +142,7 @@ paddr_t pxa2x0_lcd_mmap(void *, off_t, int);
int pxa2x0_lcd_show_screen(void *, void *, int, void (*)(void *, int, int),
void *);
void pxa2x0_lcd_power(int, void *);
+void pxa2x0_lcd_suspend(struct pxa2x0_lcd_softc *);
+void pxa2x0_lcd_resume(struct pxa2x0_lcd_softc *);
#endif /* _ARM_XSCALE_PXA2X0_LCD_H */
diff --git a/sys/arch/arm/xscale/pxa2x0reg.h b/sys/arch/arm/xscale/pxa2x0reg.h
index 74a8b639d04..8797f521ec9 100644
--- a/sys/arch/arm/xscale/pxa2x0reg.h
+++ b/sys/arch/arm/xscale/pxa2x0reg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0reg.h,v 1.24 2005/12/02 19:22:21 deraadt Exp $ */
+/* $OpenBSD: pxa2x0reg.h,v 1.25 2005/12/22 18:45:47 deraadt Exp $ */
/* $NetBSD: pxa2x0reg.h,v 1.4 2003/06/11 20:43:01 scw Exp $ */
/*
@@ -121,7 +121,7 @@
#define PXA2X0_LCDC_BASE 0x44000000 /* LCD Controller */
#define PXA2X0_LCDC_SIZE 0x220
#define PXA2X0_MEMCTL_BASE 0x48000000 /* Memory Controller */
-#define PXA2X0_MEMCTL_SIZE 0x48
+#define PXA2X0_MEMCTL_SIZE 0x84
#define PXA2X0_USBHC_BASE 0x4c000000 /* USB Host Controller */
#define PXA2X0_USBHC_SIZE 0x70
@@ -518,6 +518,8 @@ struct pxa2x0_dma_desc {
#define MEMCTL_MDMRS 0x0040
+#define MEMCTL_ARB_CNTRL 0x0048 /* System Bus Arbiter */
+
/*
* LCD Controller
*/