Commit ce443ab5 authored by GuanXuetao's avatar GuanXuetao

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: default avatarGuan Xuetao <gxt@mprc.pku.edu.cn>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
parent d10e4a66
...@@ -4902,6 +4902,7 @@ S: Maintained ...@@ -4902,6 +4902,7 @@ S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/epip/linux-2.6-unicore32.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/epip/linux-2.6-unicore32.git
F: drivers/input/serio/i8042-unicore32io.h F: drivers/input/serio/i8042-unicore32io.h
F: drivers/i2c/busses/i2c-puv3.c F: drivers/i2c/busses/i2c-puv3.c
F: drivers/video/fb-puv3.c
PMC SIERRA MaxRAID DRIVER PMC SIERRA MaxRAID DRIVER
M: Anil Ravindranath <anil_ravindranath@pmc-sierra.com> M: Anil Ravindranath <anil_ravindranath@pmc-sierra.com>
......
...@@ -66,7 +66,6 @@ CONFIG_LCD_BACKLIGHT=n ...@@ -66,7 +66,6 @@ CONFIG_LCD_BACKLIGHT=n
CONFIG_PUV3_RTC=y CONFIG_PUV3_RTC=y
CONFIG_PUV3_UMAL=y CONFIG_PUV3_UMAL=y
CONFIG_PUV3_UNIGFX=y
CONFIG_PUV3_MUSB=n CONFIG_PUV3_MUSB=n
CONFIG_PUV3_AC97=n CONFIG_PUV3_AC97=n
CONFIG_PUV3_NAND=n CONFIG_PUV3_NAND=n
...@@ -130,6 +129,8 @@ CONFIG_VIDEO_DEV=n ...@@ -130,6 +129,8 @@ CONFIG_VIDEO_DEV=n
CONFIG_USB_VIDEO_CLASS=n CONFIG_USB_VIDEO_CLASS=n
# Graphics support # Graphics support
CONFIG_FB=y
CONFIG_FB_PUV3_UNIGFX=y
# Console display driver support # Console display driver support
CONFIG_VGA_CONSOLE=n CONFIG_VGA_CONSOLE=n
CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y
......
...@@ -50,7 +50,7 @@ void puv3_pci_adjust_zones(unsigned long *size, unsigned long *holes); ...@@ -50,7 +50,7 @@ void puv3_pci_adjust_zones(unsigned long *size, unsigned long *holes);
/* kuser area */ /* kuser area */
#define KUSER_VECPAGE_BASE (KUSER_BASE + UL(0x3fff0000)) #define KUSER_VECPAGE_BASE (KUSER_BASE + UL(0x3fff0000))
#define KUSER_UNIGFX_BASE (KUSER_BASE + PKUNITY_UNIGFX_MMAP_BASE) #define KUSER_UNIGFX_BASE (PAGE_OFFSET + PKUNITY_UNIGFX_MMAP_BASE)
/* kuser_vecpage (0xbfff0000) is ro, and vectors page (0xffff0000) is rw */ /* kuser_vecpage (0xbfff0000) is ro, and vectors page (0xffff0000) is rw */
#define kuser_vecpage_to_vectors(x) ((x) - (KUSER_VECPAGE_BASE) \ #define kuser_vecpage_to_vectors(x) ((x) - (KUSER_VECPAGE_BASE) \
+ (VECTORS_BASE)) + (VECTORS_BASE))
......
...@@ -93,6 +93,19 @@ static struct resource puv3_mmc_resources[] = { ...@@ -93,6 +93,19 @@ static struct resource puv3_mmc_resources[] = {
}, },
}; };
static struct resource puv3_unigfx_resources[] = {
[0] = {
.start = PKUNITY_UNIGFX_BASE,
.end = PKUNITY_UNIGFX_BASE + 0xfff,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = PKUNITY_UNIGFX_MMAP_BASE,
.end = PKUNITY_UNIGFX_MMAP_BASE + PKUNITY_UNIGFX_MMAP_SIZE,
.flags = IORESOURCE_MEM,
},
};
static struct resource puv3_rtc_resources[] = { static struct resource puv3_rtc_resources[] = {
[0] = { [0] = {
.start = PKUNITY_RTC_BASE, .start = PKUNITY_RTC_BASE,
...@@ -256,6 +269,8 @@ void __init puv3_core_init(void) ...@@ -256,6 +269,8 @@ void __init puv3_core_init(void)
puv3_umal_resources, ARRAY_SIZE(puv3_umal_resources)); puv3_umal_resources, ARRAY_SIZE(puv3_umal_resources));
platform_device_register_simple("PKUnity-v3-MMC", -1, platform_device_register_simple("PKUnity-v3-MMC", -1,
puv3_mmc_resources, ARRAY_SIZE(puv3_mmc_resources)); puv3_mmc_resources, ARRAY_SIZE(puv3_mmc_resources));
platform_device_register_simple("PKUnity-v3-UNIGFX", -1,
puv3_unigfx_resources, ARRAY_SIZE(puv3_unigfx_resources));
platform_device_register_simple("PKUnity-v3-PWM", -1, platform_device_register_simple("PKUnity-v3-PWM", -1,
puv3_pwm_resources, ARRAY_SIZE(puv3_pwm_resources)); puv3_pwm_resources, ARRAY_SIZE(puv3_pwm_resources));
platform_device_register_simple("PKUnity-v3-UART", 0, platform_device_register_simple("PKUnity-v3-UART", 0,
......
...@@ -2365,6 +2365,17 @@ config FB_JZ4740 ...@@ -2365,6 +2365,17 @@ config FB_JZ4740
help help
Framebuffer support for the JZ4740 SoC. Framebuffer support for the JZ4740 SoC.
config FB_PUV3_UNIGFX
tristate "PKUnity v3 Unigfx framebuffer support"
depends on FB && UNICORE32 && ARCH_PUV3
select FB_SYS_FILLRECT
select FB_SYS_COPYAREA
select FB_SYS_IMAGEBLIT
select FB_SYS_FOPS
help
Choose this option if you want to use the Unigfx device as a
framebuffer device. Without the support of PCI & AGP.
source "drivers/video/omap/Kconfig" source "drivers/video/omap/Kconfig"
source "drivers/video/omap2/Kconfig" source "drivers/video/omap2/Kconfig"
......
...@@ -139,6 +139,7 @@ obj-$(CONFIG_FB_MB862XX) += mb862xx/ ...@@ -139,6 +139,7 @@ obj-$(CONFIG_FB_MB862XX) += mb862xx/
obj-$(CONFIG_FB_MSM) += msm/ obj-$(CONFIG_FB_MSM) += msm/
obj-$(CONFIG_FB_NUC900) += nuc900fb.o obj-$(CONFIG_FB_NUC900) += nuc900fb.o
obj-$(CONFIG_FB_JZ4740) += jz4740_fb.o obj-$(CONFIG_FB_JZ4740) += jz4740_fb.o
obj-$(CONFIG_FB_PUV3_UNIGFX) += fb-puv3.o
# Platform or fallback drivers go here # Platform or fallback drivers go here
obj-$(CONFIG_FB_UVESA) += uvesafb.o obj-$(CONFIG_FB_UVESA) += uvesafb.o
......
This diff is collapsed.
...@@ -152,6 +152,8 @@ ...@@ -152,6 +152,8 @@
#define FB_ACCEL_PROSAVAGE_DDR 0x8d /* S3 ProSavage DDR */ #define FB_ACCEL_PROSAVAGE_DDR 0x8d /* S3 ProSavage DDR */
#define FB_ACCEL_PROSAVAGE_DDRK 0x8e /* S3 ProSavage DDR-K */ #define FB_ACCEL_PROSAVAGE_DDRK 0x8e /* S3 ProSavage DDR-K */
#define FB_ACCEL_PUV3_UNIGFX 0xa0 /* PKUnity-v3 Unigfx */
struct fb_fix_screeninfo { struct fb_fix_screeninfo {
char id[16]; /* identification string eg "TT Builtin" */ char id[16]; /* identification string eg "TT Builtin" */
unsigned long smem_start; /* Start of frame buffer mem */ unsigned long smem_start; /* Start of frame buffer mem */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment