Commit a4701816 authored by 陳永達's avatar 陳永達

Merge branch 'neuros' of...

Merge branch 'neuros' of ssh://git@git.neuros.com.cn/git/git-pub/osd20/linux-davinci-2.6 into neuros
parents 8724c5c0 37a99d0e
...@@ -508,8 +508,9 @@ source "arch/arm/common/Kconfig" ...@@ -508,8 +508,9 @@ source "arch/arm/common/Kconfig"
config FORCE_MAX_ZONEORDER config FORCE_MAX_ZONEORDER
int int
depends on SA1111 depends on SA1111 || ARCH_DAVINCI
default "9" default "9" if SA1111
default "13" if ARCH_DAVINCI
menu "Bus support" menu "Bus support"
......
...@@ -161,7 +161,8 @@ static struct platform_device ntosd_644xa_nandflash_device = { ...@@ -161,7 +161,8 @@ static struct platform_device ntosd_644xa_nandflash_device = {
}; };
#endif #endif
#if defined(CONFIG_FB_DAVINCI) || defined(CONFIG_FB_DAVINCI_MODULE) #if defined(CONFIG_FB_DAVINCI) || defined(CONFIG_FB_DAVINCI_MODULE) || \
defined(CONFIG_FB_DM) || defined(CONFIG_FB_DM_MODULE)
static u64 davinci_fb_dma_mask = DMA_32BIT_MASK; static u64 davinci_fb_dma_mask = DMA_32BIT_MASK;
...@@ -240,7 +241,8 @@ static struct platform_device *ntosd_644xa_devices[] __initdata = { ...@@ -240,7 +241,8 @@ static struct platform_device *ntosd_644xa_devices[] __initdata = {
#if defined(CONFIG_MTD_NAND_DAVINCI) || defined(CONFIG_MTD_NAND_DAVINCI_MODULE) #if defined(CONFIG_MTD_NAND_DAVINCI) || defined(CONFIG_MTD_NAND_DAVINCI_MODULE)
&ntosd_644xa_nandflash_device, &ntosd_644xa_nandflash_device,
#endif #endif
#if defined(CONFIG_FB_DAVINCI) || defined(CONFIG_FB_DAVINCI_MODULE) #if defined(CONFIG_FB_DAVINCI) || defined(CONFIG_FB_DAVINCI_MODULE) || \
defined(CONFIG_FB_DM) || defined(CONFIG_FB_DM_MODULE)
&davinci_fb_device, &davinci_fb_device,
#endif #endif
#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
......
...@@ -182,16 +182,14 @@ static void blaster_key(struct blaster_data_pack* blsdat) ...@@ -182,16 +182,14 @@ static void blaster_key(struct blaster_data_pack* blsdat)
} }
return; return;
} }
GPIO23_DIR &= ~GIO_BLS; //gio 47 direction output
GPIO23_CLR_DATA |= GIO_BLS;
/*check if the io port status correct if not correct set it's logic to reverse of start level and hold for a momemt*/ /*check if the io port status correct if not correct set it's logic to reverse of start level and hold for a momemt*/
bitset2 = GPIO23_OUT_DATA; bitset2 = GPIO23_OUT_DATA;
if (((bitset2 & GIO_BLS) != 0) && ((bls_data_pack->bitstimes & BITS_COUNT_MASK) != 0)) if (((bitset2 & GIO_BLS) != 0) && ((bls_data_pack->bitstimes & FIRST_LEVEL_BIT_MASK) != 0))
{ {
GPIO23_CLR_DATA |= GIO_BLS; GPIO23_CLR_DATA |= GIO_BLS;
msleep(WAIT_HARDWARE_RESET); msleep(WAIT_HARDWARE_RESET);
} }
else if (((bitset2 & GIO_BLS) == 0) && ((bls_data_pack->bitstimes & BITS_COUNT_MASK) == 0)) else if (((bitset2 & GIO_BLS) == 0) && ((bls_data_pack->bitstimes & FIRST_LEVEL_BIT_MASK) == 0))
{ {
GPIO23_SET_DATA |= GIO_BLS; GPIO23_SET_DATA |= GIO_BLS;
msleep(WAIT_HARDWARE_RESET); msleep(WAIT_HARDWARE_RESET);
...@@ -276,7 +274,8 @@ static int capture_key(struct blaster_data_type* blsdat) ...@@ -276,7 +274,8 @@ static int capture_key(struct blaster_data_type* blsdat)
if (0 == times++) if (0 == times++)
{ {
blsdat->bitstimes |= ((SET_GPIO01_IN_DATA & GIO_CAP) << 8); if ((GPIO01_IN_DATA & GIO_CAP) == 0)
blsdat->bitstimes |= FIRST_LEVEL_BIT_MASK;
return 0; return 0;
} }
blsdat->bits[times-2] = td; blsdat->bits[times-2] = td;
...@@ -321,7 +320,6 @@ static irqreturn_t handle_bls_timer1_irqs(int irq, void * dev_id) ...@@ -321,7 +320,6 @@ static irqreturn_t handle_bls_timer1_irqs(int irq, void * dev_id)
{ {
disable_irq(IRQ_TINT1_TINT34); disable_irq(IRQ_TINT1_TINT34);
TIMER1_TCR &= ~(3<<22); //disable timer1 34 TIMER1_TCR &= ~(3<<22); //disable timer1 34
GPIO23_DIR |= GIO_BLS; //gio 47 direction input
bls_status = BLS_COMPLETE; bls_status = BLS_COMPLETE;
if (bls_data_pack) if (bls_data_pack)
{ {
...@@ -481,7 +479,8 @@ static int blaster_init( void ) ...@@ -481,7 +479,8 @@ static int blaster_init( void )
PWM0_PER = 709; PWM0_PER = 709;
PWM0_PH1D = 355; PWM0_PH1D = 355;
PWM0_START = 1; PWM0_START = 1;
GPIO23_DIR |= GIO_BLS; //gio 47 direction input GPIO23_DIR &= ~GIO_BLS; //gio 47 direction output
GPIO23_CLR_DATA |= GIO_BLS; //drive the gpio 47 to low
TIMER1_TCR &= ~(3<<22); //disable timer1 34 TIMER1_TCR &= ~(3<<22); //disable timer1 34
ret = request_irq(IRQ_TINT1_TINT34, handle_bls_timer1_irqs,SA_INTERRUPT , "ir_blaster_timer1", &device); //TIMER__INTERRUPT ret = request_irq(IRQ_TINT1_TINT34, handle_bls_timer1_irqs,SA_INTERRUPT , "ir_blaster_timer1", &device); //TIMER__INTERRUPT
disable_irq(IRQ_TINT1_TINT34); disable_irq(IRQ_TINT1_TINT34);
......
...@@ -1857,6 +1857,10 @@ if ARCH_OMAP ...@@ -1857,6 +1857,10 @@ if ARCH_OMAP
source "drivers/video/omap/Kconfig" source "drivers/video/omap/Kconfig"
endif endif
if ARCH_DAVINCI
source "drivers/video/dm/Kconfig"
endif
config FB_VIRTUAL config FB_VIRTUAL
tristate "Virtual Frame Buffer support (ONLY FOR TESTING!)" tristate "Virtual Frame Buffer support (ONLY FOR TESTING!)"
depends on FB depends on FB
......
...@@ -121,6 +121,7 @@ obj-$(CONFIG_FB_IMAC) += imacfb.o ...@@ -121,6 +121,7 @@ obj-$(CONFIG_FB_IMAC) += imacfb.o
obj-$(CONFIG_FB_VGA16) += vga16fb.o obj-$(CONFIG_FB_VGA16) += vga16fb.o
obj-$(CONFIG_FB_OF) += offb.o obj-$(CONFIG_FB_OF) += offb.o
obj-$(CONFIG_FB_OMAP) += omap/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o obj-$(CONFIG_FB_OMAP) += omap/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o
obj-$(CONFIG_FB_DM) += dm/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o
obj-$(CONFIG_FB_DAVINCI) += davincifb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_DAVINCI) += davincifb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
# the test framebuffer is last # the test framebuffer is last
......
config FB_DM
tristate "DM frame buffer support (EXPERIMENTAL)"
depends on FB
help
Frame buffer driver for DM644X based boards.
obj-$(CONFIG_FB_DM) += dmfb.o
dmfb-y := dm_main.o
This diff is collapsed.
...@@ -178,6 +178,9 @@ extern struct page *alloc_page_vma(gfp_t gfp_mask, ...@@ -178,6 +178,9 @@ extern struct page *alloc_page_vma(gfp_t gfp_mask,
extern unsigned long FASTCALL(__get_free_pages(gfp_t gfp_mask, unsigned int order)); extern unsigned long FASTCALL(__get_free_pages(gfp_t gfp_mask, unsigned int order));
extern unsigned long FASTCALL(get_zeroed_page(gfp_t gfp_mask)); extern unsigned long FASTCALL(get_zeroed_page(gfp_t gfp_mask));
void *alloc_pages_exact(size_t size, gfp_t gfp_mask);
void free_pages_exact(void *virt, size_t size);
#define __get_free_page(gfp_mask) \ #define __get_free_page(gfp_mask) \
__get_free_pages((gfp_mask),0) __get_free_pages((gfp_mask),0)
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#define UP_KEY 0x00 #define UP_KEY 0x00
#define GPIO01_DIR __REG(0x01C67010) #define GPIO01_DIR __REG(0x01C67010)
#define SET_GPIO01_IN_DATA __REG(0x01C67020) #define GPIO01_IN_DATA __REG(0x01C67020)
#define SET_GPIO01_RIS_INT __REG(0x01C67024) #define SET_GPIO01_RIS_INT __REG(0x01C67024)
#define CLR_GPIO01_RIS_INT __REG(0x01C67028) #define CLR_GPIO01_RIS_INT __REG(0x01C67028)
#define SET_GPIO01_FAL_INT __REG(0x01C6702C) #define SET_GPIO01_FAL_INT __REG(0x01C6702C)
......
unifdef-y += sisfb.h unifdef-y += sisfb.h davincifb.h
...@@ -432,6 +432,25 @@ ...@@ -432,6 +432,25 @@
#define OSD_TRANSPVA_RGBTRANS_SHIFT 0 #define OSD_TRANSPVA_RGBTRANS_SHIFT 0
enum
{
DAVINCIFB_WIN_VID0,
DAVINCIFB_WIN_VID1,
DAVINCIFB_WIN_OSD0,
DAVINCIFB_WIN_OSD1,
DAVINCIFB_WINDOWS
};
enum
{
DAVINCIFB_OUT_COMPOSITE,
DAVINCIFB_OUT_COMPONENT,
DAVINCIFB_OUT_SVIDEO,
DAVINCIFB_OUT_RGB,
DAVINCIFB_OUTPUTS
};
#define LCD 0 #define LCD 0
#define NTSC 1 #define NTSC 1
#define PAL 2 #define PAL 2
...@@ -457,4 +476,5 @@ struct zoom_params ...@@ -457,4 +476,5 @@ struct zoom_params
}; };
#define FBIO_SETZOOM _IOW('F', 0x24, struct zoom_params) #define FBIO_SETZOOM _IOW('F', 0x24, struct zoom_params)
#define FBIO_GETSTD _IOR('F', 0x25, u_int32_t) #define FBIO_GETSTD _IOR('F', 0x25, u_int32_t)
#define FBIO_ENABLE _IOW('F', 0x26, u_int32_t)
#endif /* _DAVINCIFB_H_ */ #endif /* _DAVINCIFB_H_ */
...@@ -1467,6 +1467,59 @@ fastcall void free_pages(unsigned long addr, unsigned int order) ...@@ -1467,6 +1467,59 @@ fastcall void free_pages(unsigned long addr, unsigned int order)
EXPORT_SYMBOL(free_pages); EXPORT_SYMBOL(free_pages);
/**
* alloc_pages_exact - allocate an exact number physically-contiguous pages.
* @size: the number of bytes to allocate
* @gfp_mask: GFP flags for the allocation
*
* This function is similar to alloc_pages(), except that it allocates the
* minimum number of pages to satisfy the request. alloc_pages() can only
* allocate memory in power-of-two pages.
*
* This function is also limited by MAX_ORDER.
*
* Memory allocated by this function must be released by free_pages_exact().
*/
void *alloc_pages_exact(size_t size, gfp_t gfp_mask)
{
unsigned int order = get_order(size);
unsigned long addr;
addr = __get_free_pages(gfp_mask, order);
if (addr) {
unsigned long alloc_end = addr + (PAGE_SIZE << order);
unsigned long used = addr + PAGE_ALIGN(size);
split_page(virt_to_page(addr), order);
while (used < alloc_end) {
free_page(used);
used += PAGE_SIZE;
}
}
return (void *)addr;
}
EXPORT_SYMBOL(alloc_pages_exact);
/**
* free_pages_exact - release memory allocated via alloc_pages_exact()
* @virt: the value returned by alloc_pages_exact.
* @size: size of allocation, same value as passed to alloc_pages_exact().
*
* Release the memory allocated by a previous call to alloc_pages_exact.
*/
void free_pages_exact(void *virt, size_t size)
{
unsigned long addr = (unsigned long)virt;
unsigned long end = addr + PAGE_ALIGN(size);
while (addr < end) {
free_page(addr);
addr += PAGE_SIZE;
}
}
EXPORT_SYMBOL(free_pages_exact);
static unsigned int nr_free_zone_pages(int offset) static unsigned int nr_free_zone_pages(int offset)
{ {
/* Just pick one node, since fallback list is circular */ /* Just pick one node, since fallback list is circular */
......
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