Skip to content

Commit

Permalink
unicore32 machine related: add frame buffer driver for pkunity-v3 soc
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
  • Loading branch information
gxt committed Mar 17, 2011
1 parent d10e4a6 commit ce443ab
Show file tree
Hide file tree
Showing 8 changed files with 879 additions and 2 deletions.
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4902,6 +4902,7 @@ S: Maintained
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/i2c/busses/i2c-puv3.c
F: drivers/video/fb-puv3.c

PMC SIERRA MaxRAID DRIVER
M: Anil Ravindranath <[email protected]>
Expand Down
3 changes: 2 additions & 1 deletion arch/unicore32/configs/debug_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ CONFIG_LCD_BACKLIGHT=n

CONFIG_PUV3_RTC=y
CONFIG_PUV3_UMAL=y
CONFIG_PUV3_UNIGFX=y
CONFIG_PUV3_MUSB=n
CONFIG_PUV3_AC97=n
CONFIG_PUV3_NAND=n
Expand Down Expand Up @@ -130,6 +129,8 @@ CONFIG_VIDEO_DEV=n
CONFIG_USB_VIDEO_CLASS=n

# Graphics support
CONFIG_FB=y
CONFIG_FB_PUV3_UNIGFX=y
# Console display driver support
CONFIG_VGA_CONSOLE=n
CONFIG_FRAMEBUFFER_CONSOLE=y
Expand Down
2 changes: 1 addition & 1 deletion arch/unicore32/include/mach/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void puv3_pci_adjust_zones(unsigned long *size, unsigned long *holes);

/* kuser area */
#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 */
#define kuser_vecpage_to_vectors(x) ((x) - (KUSER_VECPAGE_BASE) \
+ (VECTORS_BASE))
Expand Down
15 changes: 15 additions & 0 deletions arch/unicore32/kernel/puv3-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
[0] = {
.start = PKUNITY_RTC_BASE,
Expand Down Expand Up @@ -256,6 +269,8 @@ void __init puv3_core_init(void)
puv3_umal_resources, ARRAY_SIZE(puv3_umal_resources));
platform_device_register_simple("PKUnity-v3-MMC", -1,
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,
puv3_pwm_resources, ARRAY_SIZE(puv3_pwm_resources));
platform_device_register_simple("PKUnity-v3-UART", 0,
Expand Down
11 changes: 11 additions & 0 deletions drivers/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2365,6 +2365,17 @@ config FB_JZ4740
help
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/omap2/Kconfig"

Expand Down
1 change: 1 addition & 0 deletions drivers/video/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ obj-$(CONFIG_FB_MB862XX) += mb862xx/
obj-$(CONFIG_FB_MSM) += msm/
obj-$(CONFIG_FB_NUC900) += nuc900fb.o
obj-$(CONFIG_FB_JZ4740) += jz4740_fb.o
obj-$(CONFIG_FB_PUV3_UNIGFX) += fb-puv3.o

# Platform or fallback drivers go here
obj-$(CONFIG_FB_UVESA) += uvesafb.o
Expand Down
Loading

0 comments on commit ce443ab

Please sign in to comment.