ep93xx framebuffer driver
Subsystems (4)
A message that is not in the archive (sent off-list or not yet received): [email protected]
This patch adds support for the ep93xx framebuffer. Patch is against arm ep93xx branch.
Can anybody with ep93xx hardware please test, specifically with regard to the physical address bit 27 bug. My hardware has the bug, but I'm not sure about other ep93xx chips.
---
arch/arm/mach-ep93xx/core.c +29 -0
@@ -53,6 +53,7 @@#include <asm/hardware/vic.h> +#include <mach/fb.h> /************************************************************************* * Static I/O mappings that are needed for all EP93xx platforms
@@ -546,6 +547,34 @@ void __init ep93xx_register_i2c(struct i2c_board_info *devices, int num)platform_device_register (&ep93xx_i2c_device); } +/************************************************************************* +* EP93xx video peripheral handling +*************************************************************************/ +static struct ep93xxfb_mach_info ep93xxfb_data; + +static struct resource ep93xx_fb_resource[] = { + { + .start =EP93XX_RASTER_PHYS_BASE , + .end =EP93XX_RASTER_PHYS_BASE +0x800 -1 , + .flags =IORESOURCE_MEM , + }, +}; + +static struct platform_device ep93xx_fb_device = { + .name ="ep93xxfb" , + .id =0 , + .dev.platform_data = &ep93xxfb_data, + .dev.coherent_dma_mask =0xf7ffffff , + .num_resources =ARRAY_SIZE (ep93xx_fb_resource), + .resource = ep93xx_fb_resource, +}; + +void __init ep93xx_register_fb (struct ep93xxfb_mach_info *data) +{ + ep93xxfb_data = *data; +platform_device_register (&ep93xx_fb_device); +} +extern void ep93xx_gpio_init (void );void __init ep93xx_init_devices (void )
arch/arm/mach-ep93xx/include/mach/fb.h new file +56 -0
56 lines not on this page · raw message
arch/arm/mach-ep93xx/include/mach/platform.h +2 -0
@@ -5,6 +5,7 @@#ifndef __ASSEMBLY__struct i2c_board_info ; +struct ep93xxfb_mach_info ;struct ep93xx_eth_data {
@@ -17,6 +18,7 @@ void ep93xx_init_irq(void);void ep93xx_init_time (unsigned long );void ep93xx_register_eth (struct ep93xx_eth_data *data,int copy_addr);void ep93xx_register_i2c (struct i2c_board_info *devices,int num); +void ep93xx_register_fb (struct ep93xxfb_mach_info *data);void ep93xx_init_devices (void );extern struct sys_timer ep93xx_timer;
drivers/video/Kconfig +11 -0
@@ -2114,6 +2114,17 @@ config FB_MB862XX_LIME ---help--- Framebuffer support for Fujitsu Lime GDC on host CPU bus. +config FB_EP93XX + tristate "EP93XX frame buffer support" + depends on FB && ARCH_EP93XX + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + ---help--- + Framebuffer driver for the Cirrus Logic EP93XX series of processors. + This driver is also available as a module. The module will be called + ep93xxfb. + config FB_PRE_INIT_FB bool "Don't reinitialize, use bootloader's GDC/Display configuration" depends on FB_MB862XX_LIME
drivers/video/Makefile +1 -0
@@ -126,6 +126,7 @@ obj-$(CONFIG_FB_OMAP) += omap/ obj-$(CONFIG_XEN_FBDEV_FRONTEND) += xen-fbfront.o obj-$(CONFIG_FB_CARMINE) += carminefb.o obj-$(CONFIG_FB_MB862XX) += mb862xx/ +obj-$(CONFIG_FB_EP93XX) += ep93xxfb.o # Platform or fallback drivers go here obj-$(CONFIG_FB_UVESA) += uvesafb.o
drivers/video/ep93xxfb.c new file +658 -0
658 lines not on this page · raw message
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
Quoted 6 lines · Ryan Mallon
This patch adds support for the ep93xx framebuffer. Patch is against arm ep93xx branch.
Can anybody with ep93xx hardware please test, specifically with regard to the physical address bit 27 bug. My hardware has the bug, but I'm not sure about other ep93xx chips.
I have not seen the address bit 27 bug on my custom hardware with EP9307 Rev E0 silicon.
Quoted 26 lines
Signed-off-by Ryan Mallon <[email protected]>---
arch/arm/mach-ep93xx/core.c +7
-0@@ -53,6 +53,7 @@#include <asm/hardware/vic.h> +#include <mach/fb.h> /************************************************************************* * Static I/O mappings that are needed for all EP93xx platforms @@ -546,6 +547,34 @@ void __init ep93xx_register_i2c(struct i2c_board_info *devices, int num)platform_device_register (&ep93xx_i2c_device); } +/************************************************************************* +* EP93xx video peripheral handling +*************************************************************************/ +static struct ep93xxfb_mach_info ep93xxfb_data; + +static struct resource ep93xx_fb_resource[] = {
arch/arm/mach-ep93xx/core.c void __init ep93xx_register_i2c(struct i2c_board_info *devices, int num) · line 565
Quoted 10 lines
arch/arm/mach-ep93xx/core.c +10
-0+ { + .start = EP93XX_RASTER_PHYS_BASE, + .end = EP93XX_RASTER_PHYS_BASE + 0x800 - 1, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device ep93xx_fb_device = { + .name ="ep93xxfb" , + .id =0 ,
Since there can only be one framebuffer device how about using .id = -1? This will change the clk dev_id to "ep93xxfb". Also, maybe change the name to "ep93xx-fb", that's how the usb host is named.
arch/arm/mach-ep93xx/core.c void __init ep93xx_register_i2c(struct i2c_board_info *devices, int num) · line 567
Quoted 2 lines
arch/arm/mach-ep93xx/core.c +2
-0+ .dev.platform_data = &ep93xxfb_data, + .dev.coherent_dma_mask = 0xf7ffffff,
I think this is supposed to be
.dev.coherent_dma_mask = DMA_BIT_MASK(32),
Or is the missing bit due to the address bit 27 bug?
arch/arm/mach-ep93xx/core.c void __init ep93xx_register_i2c(struct i2c_board_info *devices, int num) · line 580
Quoted 13 lines
arch/arm/mach-ep93xx/core.c +10
-0+ .num_resources = ARRAY_SIZE(ep93xx_fb_resource), + .resource = ep93xx_fb_resource, +}; + +void __init ep93xx_register_fb (struct ep93xxfb_mach_info *data) +{ + ep93xxfb_data = *data; +platform_device_register (&ep93xx_fb_device); +} +extern void ep93xx_gpio_init (void );void __init ep93xx_init_devices (void )
I will test the remainder of this patch later this week and comment then.
Regards,
Hartley
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
Quoted 10 lines · H Hartley Sweeten
Quoted 6 lines · Ryan Mallon
This patch adds support for the ep93xx framebuffer. Patch is against arm ep93xx branch.
Can anybody with ep93xx hardware please test, specifically with regard to the physical address bit 27 bug. My hardware has the bug, but I'm not sure about other ep93xx chips.
I have not seen the address bit 27 bug on my custom hardware with EP9307 Rev E0 silicon.
Have you had the driver allocate a physical memory address which has bit 27 set? I'm basically wondering whether to enable the check by default or not. If the problem only exists on a few ep93xx chips then it may be better to leave the check off by default.
Quoted 9 lines
arch/arm/mach-ep93xx/core.c void __init ep93xx_register_i2c(struct i2c_board_info *devices, int num) · line 565
Quoted 4 lines
arch/arm/mach-ep93xx/core.c +4
-0+ +static struct platform_device ep93xx_fb_device = { + .name ="ep93xxfb" , + .id =0 ,Since there can only be one framebuffer device how about using .id = -1? This will change the clk
dev_idto "ep93xxfb". Also, maybe change the name to "ep93xx-fb", that's how the usb host is named.
Will fix both.
Quoted 9 lines
arch/arm/mach-ep93xx/core.c void __init ep93xx_register_i2c(struct i2c_board_info *devices, int num) · line 567
Quoted 3 lines
arch/arm/mach-ep93xx/core.c +2
-0+ .dev.platform_data = &ep93xxfb_data, + .dev.coherent_dma_mask = 0xf7ffffff,I think this is supposed to be
.dev.coherent_dma_mask = DMA_BIT_MASK(32),Or is the missing bit due to the address bit 27 bug?
Yeah, its for bit 27. Not sure how to handle this correctly if the check is a driver option. If you don't have this problem, just change it to DMA_BIT_MASK(32) for testing.
~Ryan
Signature · 15 lines
Bluewater Systems Ltd - ARM Technology Solution Centre
Ryan Mallon Unit 5, Amuri Park
Phone: +64 3 3779127 404 Barbadoes St
Fax: +64 3 3779135 PO Box 13 889
Email: [email protected] Christchurch, 8013
Web: http://www.bluewatersys.com New Zealand
Freecall Australia 1800 148 751 USA 1800 261 2934
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com Quoted 7 lines · Ryan Mallon
Quoted 7 lines
Quoted 6 lines
This patch adds support for the ep93xx framebuffer. Patch is against arm ep93xx branch.
Can anybody with ep93xx hardware please test, specifically with regard to the physical address bit 27 bug. My hardware has the bug, but I'm not sure about other ep93xx chips.
Quoted 7 lines
Quoted 2 lines
I have not seen the address bit 27 bug on my custom hardware with EP9307 Rev E0 silicon.
Have you had the driver allocate a physical memory address which has bit 27 set? I'm basically wondering whether to enable the check by default or not. If the problem only exists on a few ep93xx chips then it may be better to leave the check off by default.
I just thought about it... On my platform it's impossible to allocate a physical memory address which has bit 27 set.
My board has 64MB SDRAM on SDCE0 and the bootloader is setting the SROMLL bit when configuring the SDRAM controller. This results in my SDRAM getting physically mapped to:
0xc0000000 - 0xc1ffffff0xc4000000 - 0xc5ffffff
Looking at the various SDRAM address mappings it appears the only way to get a physical address with bit 27 set is to have SROMLL = 0. This is generally not a good idea because the SDRAM gets very segmented with certain memory configurations.
Refer to the following document for more information:
http://arm.cirrus.com/files/HOWTO/EP93xx%20SDRAM%20Address%20Ranges.pdf
Quoted 11 lines
Quoted 9 lines
arch/arm/mach-ep93xx/core.c void __init ep93xx_register_i2c(struct i2c_board_info *devices, int num) · line 565
Quoted 4 lines
arch/arm/mach-ep93xx/core.c +4
-0+ +static struct platform_device ep93xx_fb_device = { + .name ="ep93xxfb" , + .id =0 ,Since there can only be one framebuffer device how about using .id = -1? This will change the clk
dev_idto "ep93xxfb". Also, maybe change the name to "ep93xx-fb", that's how the usb host is named.Will fix both.
Ok. You might need to change the name in the driver also.
Quoted 5 lines
Quoted 5 lines
arch/arm/mach-ep93xx/core.c void __init ep93xx_register_i2c(struct i2c_board_info *devices, int num) · line 567
Quoted 2 lines
arch/arm/mach-ep93xx/core.c +2
-0+ .dev.platform_data = &ep93xxfb_data, + .dev.coherent_dma_mask = 0xf7ffffff,I think this is supposed to be
Quoted 7 lines
Quoted 3 lines
.dev.coherent_dma_mask = DMA_BIT_MASK(32),Or is the missing bit due to the address bit 27 bug?
Yeah, its for bit 27. Not sure how to handle this correctly if the check is a driver option. If you don't have this problem, just change it to
DMA_BIT_MASK(32)for testing.
I have been using DMA_BIT_MASK(32) for quite a while with no problems.
Isn't there also supposed to be a:
.dev.dma_mask = &ep93xx_fb_device.dev.coherent_dma_mask,
in the platform_device struct? Look at the ep93xx_ohci_device for reference.
Regards,
Hartley
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com