Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167167
b: refs/heads/master
c: 084d320
h: refs/heads/master
i:
  167165: 4117053
  167163: 336b219
  167159: 77b2ea7
  167151: 9f8ed49
  167135: 4e878a9
  167103: b8a11ab
  167039: 114e738
  166911: ef70879
v: v3
  • Loading branch information
Linus Torvalds committed Oct 9, 2009
1 parent 9cc10e3 commit f56ef75
Show file tree
Hide file tree
Showing 26 changed files with 242 additions and 127 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8e5132175bebaa26f8ea5036a1e942686c11cab4
refs/heads/master: 084d3200d523fc24d95e97797b6cdf1256bf0d1b
2 changes: 0 additions & 2 deletions trunk/arch/sh/boards/board-magicpanelr2.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,6 @@ static void __init setup_port_multiplexing(void)

static void __init mpr2_setup(char **cmdline_p)
{
__set_io_port_base(0xa0000000);

/* set Pin Select Register A:
* /PCC_CD1, /PCC_CD2, PCC_BVD1, PCC_BVD2,
* /IOIS16, IRQ4, IRQ5, USB1d_SUSPEND
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/sh/boards/mach-dreamcast/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ static void __init dreamcast_setup(char **cmdline_p)
/* Acknowledge any previous events */
/* XXX */

__set_io_port_base(0xa0000000);

/* Assign all virtual IRQs to the System ASIC int. handler */
for (i = HW_EVENT_IRQ_BASE; i < HW_EVENT_IRQ_MAX; i++)
set_irq_chip_and_handler(i, &systemasic_int,
Expand Down
63 changes: 62 additions & 1 deletion trunk/arch/sh/boards/mach-ecovec24/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <linux/delay.h>
#include <linux/usb/r8a66597.h>
#include <linux/i2c.h>
#include <linux/i2c/tsc2007.h>
#include <linux/input.h>
#include <video/sh_mobile_lcdc.h>
#include <media/sh_mobile_ceu.h>
Expand All @@ -38,6 +39,20 @@
* 0x1800_0000 MFI 16bit
*/

/* SWITCH
*------------------------------
* DS2[1] = FlashROM write protect ON : write protect
* OFF : No write protect
* DS2[2] = RMII / TS, SCIF ON : RMII
* OFF : TS, SCIF3
* DS2[3] = Camera / Video ON : Camera
* OFF : NTSC/PAL (IN)
* DS2[5] = NTSC_OUT Clock ON : On board OSC
* OFF : SH7724 DV_CLK
* DS2[6-7] = MMC / SD ON-OFF : SD
* OFF-ON : MMC
*/

/* Heartbeat */
static unsigned char led_pos[] = { 0, 1, 2, 3 };
static struct heartbeat_data heartbeat_data = {
Expand Down Expand Up @@ -70,7 +85,7 @@ static struct mtd_partition nor_flash_partitions[] = {
.name = "boot loader",
.offset = 0,
.size = (5 * 1024 * 1024),
.mask_flags = MTD_CAP_ROM,
.mask_flags = MTD_WRITEABLE, /* force read-only */
}, {
.name = "free-area",
.offset = MTDPART_OFS_APPEND,
Expand Down Expand Up @@ -376,6 +391,43 @@ static struct platform_device keysc_device = {
},
};

/* TouchScreen */
#define IRQ0 32
static int ts_get_pendown_state(void)
{
int val = 0;
gpio_free(GPIO_FN_INTC_IRQ0);
gpio_request(GPIO_PTZ0, NULL);
gpio_direction_input(GPIO_PTZ0);

val = gpio_get_value(GPIO_PTZ0);

gpio_free(GPIO_PTZ0);
gpio_request(GPIO_FN_INTC_IRQ0, NULL);

return val ? 0 : 1;
}

static int ts_init(void)
{
gpio_request(GPIO_FN_INTC_IRQ0, NULL);
return 0;
}

struct tsc2007_platform_data tsc2007_info = {
.model = 2007,
.x_plate_ohms = 180,
.get_pendown_state = ts_get_pendown_state,
.init_platform_hw = ts_init,
};

static struct i2c_board_info ts_i2c_clients = {
I2C_BOARD_INFO("tsc2007", 0x48),
.type = "tsc2007",
.platform_data = &tsc2007_info,
.irq = IRQ0,
};

static struct platform_device *ecovec_devices[] __initdata = {
&heartbeat_device,
&nor_flash_device,
Expand Down Expand Up @@ -460,6 +512,11 @@ static void __init sh_eth_init(void)
#define IODRIVEA 0xA405018A
static int __init arch_setup(void)
{
/* enable STATUS0, STATUS2 and PDSTATUS */
gpio_request(GPIO_FN_STATUS0, NULL);
gpio_request(GPIO_FN_STATUS2, NULL);
gpio_request(GPIO_FN_PDSTATUS, NULL);

/* enable SCIFA0 */
gpio_request(GPIO_FN_SCIF0_TXD, NULL);
gpio_request(GPIO_FN_SCIF0_RXD, NULL);
Expand Down Expand Up @@ -590,6 +647,10 @@ static int __init arch_setup(void)
*/
gpio_request(GPIO_PTF4, NULL);
gpio_direction_output(GPIO_PTF4, 1);

/* enable TouchScreen */
i2c_register_board_info(0, &ts_i2c_clients, 1);
set_irq_type(IRQ0, IRQ_TYPE_LEVEL_LOW);
}

/* enable CEU0 */
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/sh/kernel/cpu/sh3/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ call_do_page_fault:
mov.l 1f, r0
mov.l @r0, r6

sti

mov.l 3f, r0
mov.l 4f, r1
mov r15, r4
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/sh/kernel/io_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ void generic_outsl(unsigned long port, const void *src, unsigned long count)

void __iomem *generic_ioport_map(unsigned long addr, unsigned int size)
{
if (PXSEG(addr) >= P1SEG)
return (void __iomem *)addr;

return (void __iomem *)(addr + generic_io_base);
}

Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/sh/kernel/machvec.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/string.h>
#include <asm/machvec.h>
#include <asm/sections.h>
#include <asm/addrspace.h>
#include <asm/setup.h>
#include <asm/io.h>
#include <asm/irq.h>
Expand Down Expand Up @@ -133,4 +134,6 @@ void __init sh_mv_setup(void)

if (!sh_mv.mv_nr_irqs)
sh_mv.mv_nr_irqs = NR_IRQS;

__set_io_port_base(P2SEG);
}
1 change: 1 addition & 0 deletions trunk/arch/sh/kernel/sh_ksyms_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ DECLARE_EXPORT(__movstrSI60);
DECLARE_EXPORT(__movstr_i4_even);
DECLARE_EXPORT(__movstr_i4_odd);
DECLARE_EXPORT(__movstrSI12_i4);
DECLARE_EXPORT(__movmem);
DECLARE_EXPORT(__movmem_i4_even);
DECLARE_EXPORT(__movmem_i4_odd);
DECLARE_EXPORT(__movmemSI12_i4);
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/sh/kernel/traps_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ static unsigned long se_multi;
/* bitfield: 1: warn 2: fixup 4: signal -> combinations 2|4 && 1|2|4 are not
valid! */
static int se_usermode = 3;
/* 0: no warning 1: print a warning message */
static int se_kernmode_warn = 1;
/* 0: no warning 1: print a warning message, disabled by default */
static int se_kernmode_warn;

#ifdef CONFIG_PROC_FS
static const char *se_usermode_action[] = {
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/mm/cache-sh4.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static void (*__flush_dcache_segment_fn)(unsigned long, unsigned long) =
* Called from kernel/module.c:sys_init_module and routine for a.out format,
* signal handler code and kprobes code
*/
static void sh4_flush_icache_range(void *args)
static void __uses_jump_to_uncached sh4_flush_icache_range(void *args)
{
struct flusher_data *data = args;
unsigned long start, end;
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/sh/mm/cache-sh7705.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static void sh7705_flush_icache_range(void *args)
/*
* Writeback&Invalidate the D-cache of the page
*/
static void __flush_dcache_page(unsigned long phys)
static void __uses_jump_to_uncached __flush_dcache_page(unsigned long phys)
{
unsigned long ways, waysize, addrstart;
unsigned long flags;
Expand Down Expand Up @@ -144,7 +144,7 @@ static void sh7705_flush_dcache_page(void *arg)
__flush_dcache_page(PHYSADDR(page_address(page)));
}

static void sh7705_flush_cache_all(void *args)
static void __uses_jump_to_uncached sh7705_flush_cache_all(void *args)
{
unsigned long flags;

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/mm/ioremap_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
*
* PMB entries are all pre-faulted.
*/
if (unlikely(size >= 0x1000000)) {
if (unlikely(phys_addr >= P1SEG)) {
unsigned long mapped = pmb_remap(addr, phys_addr, size, flags);

if (likely(mapped)) {
Expand Down
37 changes: 31 additions & 6 deletions trunk/arch/sh/mm/pmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

#define NR_PMB_ENTRIES 16

static void __pmb_unmap(struct pmb_entry *);

static struct kmem_cache *pmb_cache;
static unsigned long pmb_map;

Expand Down Expand Up @@ -218,9 +220,10 @@ static struct {
long pmb_remap(unsigned long vaddr, unsigned long phys,
unsigned long size, unsigned long flags)
{
struct pmb_entry *pmbp;
struct pmb_entry *pmbp, *pmbe;
unsigned long wanted;
int pmb_flags, i;
long err;

/* Convert typical pgprot value to the PMB equivalent */
if (flags & _PAGE_CACHABLE) {
Expand All @@ -236,20 +239,22 @@ long pmb_remap(unsigned long vaddr, unsigned long phys,

again:
for (i = 0; i < ARRAY_SIZE(pmb_sizes); i++) {
struct pmb_entry *pmbe;
int ret;

if (size < pmb_sizes[i].size)
continue;

pmbe = pmb_alloc(vaddr, phys, pmb_flags | pmb_sizes[i].flag);
if (IS_ERR(pmbe))
return PTR_ERR(pmbe);
if (IS_ERR(pmbe)) {
err = PTR_ERR(pmbe);
goto out;
}

ret = set_pmb_entry(pmbe);
if (ret != 0) {
pmb_free(pmbe);
return -EBUSY;
err = -EBUSY;
goto out;
}

phys += pmb_sizes[i].size;
Expand All @@ -264,12 +269,25 @@ long pmb_remap(unsigned long vaddr, unsigned long phys,
pmbp->link = pmbe;

pmbp = pmbe;

/*
* Instead of trying smaller sizes on every iteration
* (even if we succeed in allocating space), try using
* pmb_sizes[i].size again.
*/
i--;
}

if (size >= 0x1000000)
goto again;

return wanted - size;

out:
if (pmbp)
__pmb_unmap(pmbp);

return err;
}

void pmb_unmap(unsigned long addr)
Expand All @@ -283,12 +301,19 @@ void pmb_unmap(unsigned long addr)
if (unlikely(!pmbe))
return;

__pmb_unmap(pmbe);
}

static void __pmb_unmap(struct pmb_entry *pmbe)
{
WARN_ON(!test_bit(pmbe->entry, &pmb_map));

do {
struct pmb_entry *pmblink = pmbe;

clear_pmb_entry(pmbe);
if (pmbe->entry != PMB_NO_ENTRY)
clear_pmb_entry(pmbe);

pmbe = pmblink->link;

pmb_free(pmblink);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1468,6 +1468,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
spin_lock_init(&dev_priv->user_irq_lock);
spin_lock_init(&dev_priv->error_lock);
dev_priv->user_irq_refcount = 0;
dev_priv->trace_irq_seqno = 0;

ret = drm_vblank_init(dev, I915_NUM_PIPE);

Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/gpu/drm/i915/i915_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ typedef struct drm_i915_private {
spinlock_t user_irq_lock;
/** Refcount for i915_user_irq_get() versus i915_user_irq_put(). */
int user_irq_refcount;
u32 trace_irq_seqno;
/** Cached value of IMR to avoid reads in updating the bitfield */
u32 irq_mask_reg;
u32 pipestat[2];
Expand Down Expand Up @@ -665,6 +666,7 @@ extern int i915_irq_emit(struct drm_device *dev, void *data,
extern int i915_irq_wait(struct drm_device *dev, void *data,
struct drm_file *file_priv);
void i915_user_irq_get(struct drm_device *dev);
void i915_trace_irq_get(struct drm_device *dev, u32 seqno);
void i915_user_irq_put(struct drm_device *dev);
extern void i915_enable_interrupt (struct drm_device *dev);

Expand Down
10 changes: 8 additions & 2 deletions trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1770,7 +1770,7 @@ i915_gem_retire_requests(struct drm_device *dev)
drm_i915_private_t *dev_priv = dev->dev_private;
uint32_t seqno;

if (!dev_priv->hw_status_page)
if (!dev_priv->hw_status_page || list_empty(&dev_priv->mm.request_list))
return;

seqno = i915_get_gem_seqno(dev);
Expand All @@ -1794,6 +1794,12 @@ i915_gem_retire_requests(struct drm_device *dev)
} else
break;
}

if (unlikely (dev_priv->trace_irq_seqno &&
i915_seqno_passed(dev_priv->trace_irq_seqno, seqno))) {
i915_user_irq_put(dev);
dev_priv->trace_irq_seqno = 0;
}
}

void
Expand Down Expand Up @@ -3352,7 +3358,7 @@ i915_dispatch_gem_execbuffer(struct drm_device *dev,
exec_start = (uint32_t) exec_offset + exec->batch_start_offset;
exec_len = (uint32_t) exec->batch_len;

trace_i915_gem_request_submit(dev, dev_priv->mm.next_gem_seqno);
trace_i915_gem_request_submit(dev, dev_priv->mm.next_gem_seqno + 1);

count = nbox ? nbox : 1;

Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/gpu/drm/i915/i915_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,16 @@ void i915_user_irq_put(struct drm_device *dev)
spin_unlock_irqrestore(&dev_priv->user_irq_lock, irqflags);
}

void i915_trace_irq_get(struct drm_device *dev, u32 seqno)
{
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;

if (dev_priv->trace_irq_seqno == 0)
i915_user_irq_get(dev);

dev_priv->trace_irq_seqno = seqno;
}

static int i915_wait_irq(struct drm_device * dev, int irq_nr)
{
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
Expand Down
Loading

0 comments on commit f56ef75

Please sign in to comment.