aboutsummaryrefslogtreecommitdiffstats
path: root/arch/unicore32
diff options
context:
space:
mode:
authorGuanXuetao <gxt@mprc.pku.edu.cn>2011-02-26 08:39:10 -0500
committerGuanXuetao <gxt@mprc.pku.edu.cn>2011-03-16 21:19:20 -0400
commitce443ab5fd536941da1d529ba3963324f941fc29 (patch)
tree5551778e3ae1d623410ad98cbeefe941fc29dd28 /arch/unicore32
parentd10e4a660d11212a41ac5d2c116a655e25e2d38a (diff)
unicore32 machine related: add frame buffer driver for pkunity-v3 soc
change from original version -- by advice of Paul Mundt 1. remove videomemorysize definitions 2. remove unifb_enable and unifb_setup 3. use dev_warn instead of printk in fb driver 4. remove judgement for FB_ACCEL_PUV3_UNIGFX 5. adjust clk_get and clk_set_rate calls 6. add resources definitions 7. remove unifb_option 8. adjust register for platform_device 9. adjust unifb_ops position and unifb_regs assignment position Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/unicore32')
-rw-r--r--arch/unicore32/configs/debug_defconfig3
-rw-r--r--arch/unicore32/include/mach/memory.h2
-rw-r--r--arch/unicore32/kernel/puv3-core.c15
3 files changed, 18 insertions, 2 deletions
diff --git a/arch/unicore32/configs/debug_defconfig b/arch/unicore32/configs/debug_defconfig
index bf42abdd9683..b5fbde9f1cb2 100644
--- a/arch/unicore32/configs/debug_defconfig
+++ b/arch/unicore32/configs/debug_defconfig
@@ -66,7 +66,6 @@ CONFIG_LCD_BACKLIGHT=n
66 66
67CONFIG_PUV3_RTC=y 67CONFIG_PUV3_RTC=y
68CONFIG_PUV3_UMAL=y 68CONFIG_PUV3_UMAL=y
69CONFIG_PUV3_UNIGFX=y
70CONFIG_PUV3_MUSB=n 69CONFIG_PUV3_MUSB=n
71CONFIG_PUV3_AC97=n 70CONFIG_PUV3_AC97=n
72CONFIG_PUV3_NAND=n 71CONFIG_PUV3_NAND=n
@@ -130,6 +129,8 @@ CONFIG_VIDEO_DEV=n
130CONFIG_USB_VIDEO_CLASS=n 129CONFIG_USB_VIDEO_CLASS=n
131 130
132# Graphics support 131# Graphics support
132CONFIG_FB=y
133CONFIG_FB_PUV3_UNIGFX=y
133# Console display driver support 134# Console display driver support
134CONFIG_VGA_CONSOLE=n 135CONFIG_VGA_CONSOLE=n
135CONFIG_FRAMEBUFFER_CONSOLE=y 136CONFIG_FRAMEBUFFER_CONSOLE=y
diff --git a/arch/unicore32/include/mach/memory.h b/arch/unicore32/include/mach/memory.h
index 541949dfa5b4..b774eff3ea65 100644
--- a/arch/unicore32/include/mach/memory.h
+++ b/arch/unicore32/include/mach/memory.h
@@ -50,7 +50,7 @@ void puv3_pci_adjust_zones(unsigned long *size, unsigned long *holes);
50 50
51/* kuser area */ 51/* kuser area */
52#define KUSER_VECPAGE_BASE (KUSER_BASE + UL(0x3fff0000)) 52#define KUSER_VECPAGE_BASE (KUSER_BASE + UL(0x3fff0000))
53#define KUSER_UNIGFX_BASE (KUSER_BASE + PKUNITY_UNIGFX_MMAP_BASE) 53#define KUSER_UNIGFX_BASE (PAGE_OFFSET + PKUNITY_UNIGFX_MMAP_BASE)
54/* kuser_vecpage (0xbfff0000) is ro, and vectors page (0xffff0000) is rw */ 54/* kuser_vecpage (0xbfff0000) is ro, and vectors page (0xffff0000) is rw */
55#define kuser_vecpage_to_vectors(x) ((x) - (KUSER_VECPAGE_BASE) \ 55#define kuser_vecpage_to_vectors(x) ((x) - (KUSER_VECPAGE_BASE) \
56 + (VECTORS_BASE)) 56 + (VECTORS_BASE))
diff --git a/arch/unicore32/kernel/puv3-core.c b/arch/unicore32/kernel/puv3-core.c
index 6edf928a106c..7d10e7b07c20 100644
--- a/arch/unicore32/kernel/puv3-core.c
+++ b/arch/unicore32/kernel/puv3-core.c
@@ -93,6 +93,19 @@ static struct resource puv3_mmc_resources[] = {
93 }, 93 },
94}; 94};
95 95
96static struct resource puv3_unigfx_resources[] = {
97 [0] = {
98 .start = PKUNITY_UNIGFX_BASE,
99 .end = PKUNITY_UNIGFX_BASE + 0xfff,
100 .flags = IORESOURCE_MEM,
101 },
102 [1] = {
103 .start = PKUNITY_UNIGFX_MMAP_BASE,
104 .end = PKUNITY_UNIGFX_MMAP_BASE + PKUNITY_UNIGFX_MMAP_SIZE,
105 .flags = IORESOURCE_MEM,
106 },
107};
108
96static struct resource puv3_rtc_resources[] = { 109static struct resource puv3_rtc_resources[] = {
97 [0] = { 110 [0] = {
98 .start = PKUNITY_RTC_BASE, 111 .start = PKUNITY_RTC_BASE,
@@ -256,6 +269,8 @@ void __init puv3_core_init(void)
256 puv3_umal_resources, ARRAY_SIZE(puv3_umal_resources)); 269 puv3_umal_resources, ARRAY_SIZE(puv3_umal_resources));
257 platform_device_register_simple("PKUnity-v3-MMC", -1, 270 platform_device_register_simple("PKUnity-v3-MMC", -1,
258 puv3_mmc_resources, ARRAY_SIZE(puv3_mmc_resources)); 271 puv3_mmc_resources, ARRAY_SIZE(puv3_mmc_resources));
272 platform_device_register_simple("PKUnity-v3-UNIGFX", -1,
273 puv3_unigfx_resources, ARRAY_SIZE(puv3_unigfx_resources));
259 platform_device_register_simple("PKUnity-v3-PWM", -1, 274 platform_device_register_simple("PKUnity-v3-PWM", -1,
260 puv3_pwm_resources, ARRAY_SIZE(puv3_pwm_resources)); 275 puv3_pwm_resources, ARRAY_SIZE(puv3_pwm_resources));
261 platform_device_register_simple("PKUnity-v3-UART", 0, 276 platform_device_register_simple("PKUnity-v3-UART", 0,