Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233161
b: refs/heads/master
c: f7909fb
h: refs/heads/master
i:
  233159: c22663a
v: v3
  • Loading branch information
Linus Torvalds committed Feb 12, 2011
1 parent 1f76866 commit a72b8eb
Show file tree
Hide file tree
Showing 26 changed files with 117 additions and 134 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: 47970b1b2aa64464bc0a9543e86361a622ae7c03
refs/heads/master: f7909fb83550573300e72d120a7d97c9f6b53a65
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-s5pv310/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ config MACH_SMDKV310
select S3C_DEV_HSMMC2
select S3C_DEV_HSMMC3
select S5PV310_DEV_PD
select S5PV310_DEV_SYSMMU
select S5PV310_SETUP_I2C1
select S5PV310_SETUP_SDHCI
help
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/arm/mach-s5pv310/include/mach/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@
#define S5PV310_PA_SYSMMU_TV 0x12E20000
#define S5PV310_PA_SYSMMU_MFC_L 0x13620000
#define S5PV310_PA_SYSMMU_MFC_R 0x13630000
#define S5PV310_SYSMMU_TOTAL_IPNUM 16
#define S5P_SYSMMU_TOTAL_IPNUM S5PV310_SYSMMU_TOTAL_IPNUM

/* compatibiltiy defines. */
#define S3C_PA_UART S5PV310_PA_UART
Expand Down
5 changes: 4 additions & 1 deletion trunk/arch/arm/mach-s5pv310/include/mach/sysmmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
#ifndef __ASM_ARM_ARCH_SYSMMU_H
#define __ASM_ARM_ARCH_SYSMMU_H __FILE__

#define S5PV310_SYSMMU_TOTAL_IPNUM 16
#define S5P_SYSMMU_TOTAL_IPNUM S5PV310_SYSMMU_TOTAL_IPNUM

enum s5pv310_sysmmu_ips {
SYSMMU_MDMA,
SYSMMU_SSS,
Expand All @@ -32,7 +35,7 @@ enum s5pv310_sysmmu_ips {
SYSMMU_MFC_R,
};

static char *sysmmu_ips_name[S5P_SYSMMU_TOTAL_IPNUM] = {
static char *sysmmu_ips_name[S5PV310_SYSMMU_TOTAL_IPNUM] = {
"SYSMMU_MDMA" ,
"SYSMMU_SSS" ,
"SYSMMU_FIMC0" ,
Expand Down
24 changes: 8 additions & 16 deletions trunk/arch/arm/plat-s5p/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ config S5P_GPIO_INT
help
Common code for the GPIO interrupts (other than external interrupts.)

comment "System MMU"

config S5P_SYSTEM_MMU
bool "S5P SYSTEM MMU"
depends on ARCH_S5PV310
help
Say Y here if you want to enable System MMU

config S5P_DEV_FIMC0
bool
help
Expand Down Expand Up @@ -66,19 +74,3 @@ config S5P_DEV_CSIS1
bool
help
Compile in platform device definitions for MIPI-CSIS channel 1

menuconfig S5P_SYSMMU
bool "SYSMMU support"
depends on ARCH_S5PV310
help
This is a System MMU driver for Samsung ARM based Soc.

if S5P_SYSMMU

config S5P_SYSMMU_DEBUG
bool "Enables debug messages"
depends on S5P_SYSMMU
help
This enables SYSMMU driver debug massages.

endif
2 changes: 1 addition & 1 deletion trunk/arch/arm/plat-s5p/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ obj-y += clock.o
obj-y += irq.o
obj-$(CONFIG_S5P_EXT_INT) += irq-eint.o
obj-$(CONFIG_S5P_GPIO_INT) += irq-gpioint.o
obj-$(CONFIG_S5P_SYSTEM_MMU) += sysmmu.o
obj-$(CONFIG_PM) += pm.o
obj-$(CONFIG_PM) += irq-pm.o

Expand All @@ -30,4 +31,3 @@ obj-$(CONFIG_S5P_DEV_FIMC2) += dev-fimc2.o
obj-$(CONFIG_S5P_DEV_ONENAND) += dev-onenand.o
obj-$(CONFIG_S5P_DEV_CSIS0) += dev-csis0.o
obj-$(CONFIG_S5P_DEV_CSIS1) += dev-csis1.o
obj-$(CONFIG_S5P_SYSMMU) += sysmmu.o
23 changes: 0 additions & 23 deletions trunk/arch/arm/plat-s5p/include/plat/sysmmu.h

This file was deleted.

4 changes: 1 addition & 3 deletions trunk/arch/arm/plat-s5p/sysmmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
#include <mach/regs-sysmmu.h>
#include <mach/sysmmu.h>

#include <plat/sysmmu.h>

struct sysmmu_controller s5p_sysmmu_cntlrs[S5P_SYSMMU_TOTAL_IPNUM];

void s5p_sysmmu_register(struct sysmmu_controller *sysmmuconp)
Expand Down Expand Up @@ -123,7 +121,7 @@ static int s5p_sysmmu_set_tablebase(sysmmu_ips ips)
: "=r" (pg) : : "cc"); \
pg &= ~0x3fff;

sysmmu_debug("CP15 TTBR0 : 0x%x\n", pg);
printk(KERN_INFO "%s: CP15 TTBR0 : 0x%x\n", __func__, pg);

/* Set sysmmu page table base address */
__raw_writel(pg, sysmmuconp->regs + S5P_PT_BASE_ADDR);
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/plat-samsung/include/plat/pm.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#include <linux/irq.h>

struct sys_device;

#ifdef CONFIG_PM

extern __init int s3c_pm_init(void);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/microblaze/include/asm/irqflags.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <linux/types.h>
#include <asm/registers.h>

#ifdef CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR

static inline unsigned long arch_local_irq_save(void)
{
Expand Down
27 changes: 13 additions & 14 deletions trunk/arch/microblaze/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -411,20 +411,19 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
static inline unsigned long pte_update(pte_t *p, unsigned long clr,
unsigned long set)
{
unsigned long old, tmp, msr;

__asm__ __volatile__("\
msrclr %2, 0x2\n\
nop\n\
lw %0, %4, r0\n\
andn %1, %0, %5\n\
or %1, %1, %6\n\
sw %1, %4, r0\n\
mts rmsr, %2\n\
nop"
: "=&r" (old), "=&r" (tmp), "=&r" (msr), "=m" (*p)
: "r" ((unsigned long)(p + 1) - 4), "r" (clr), "r" (set), "m" (*p)
: "cc");
unsigned long flags, old, tmp;

raw_local_irq_save(flags);

__asm__ __volatile__( "lw %0, %2, r0 \n"
"andn %1, %0, %3 \n"
"or %1, %1, %4 \n"
"sw %1, %2, r0 \n"
: "=&r" (old), "=&r" (tmp)
: "r" ((unsigned long)(p + 1) - 4), "r" (clr), "r" (set)
: "cc");

raw_local_irq_restore(flags);

return old;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/microblaze/kernel/cpu/pvr.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
register unsigned tmp __asm__("r3"); \
tmp = 0x0; /* Prevent warning about unused */ \
__asm__ __volatile__ ( \
"mfs %0, rpvr" #pvrid ";" \
"mfs %0, rpvr" #pvrid ";" \
: "=r" (tmp) : : "memory"); \
val = tmp; \
}
Expand All @@ -54,7 +54,7 @@ int cpu_has_pvr(void)
if (!(flags & PVR_MSR_BIT))
return 0;

get_single_pvr(0x00, pvr0);
get_single_pvr(0, pvr0);
pr_debug("%s: pvr0 is 0x%08x\n", __func__, pvr0);

if (pvr0 & PVR0_PVR_FULL_MASK)
Expand Down
15 changes: 7 additions & 8 deletions trunk/arch/microblaze/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,14 @@ real_start:
andi r1, r1, ~2
mts rmsr, r1
/*
* Here is checking mechanism which check if Microblaze has msr instructions
* We load msr and compare it with previous r1 value - if is the same,
* msr instructions works if not - cpu don't have them.
* According to Xilinx, msrclr instruction behaves like 'mfs rX,rpc'
* if the msrclr instruction is not enabled. We use this to detect
* if the opcode is available, by issuing msrclr and then testing the result.
* r8 == 0 - msr instructions are implemented
* r8 != 0 - msr instructions are not implemented
*/
/* r8=0 - I have msr instr, 1 - I don't have them */
rsubi r0, r0, 1 /* set the carry bit */
msrclr r0, 0x4 /* try to clear it */
/* read the carry bit, r8 will be '0' if msrclr exists */
addik r8, r0, 0
msrclr r8, 0 /* clear nothing - just read msr for test */
cmpu r8, r8, r1 /* r1 must contain msr reg content */

/* r7 may point to an FDT, or there may be one linked in.
if it's in r7, we've got to save it away ASAP.
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/microblaze/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ void __init machine_early_init(const char *cmdline, unsigned int ram,
#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
if (msr)
eprintk("!!!Your kernel has setup MSR instruction but "
"CPU don't have it %d\n", msr);
"CPU don't have it %x\n", msr);
#else
if (!msr)
eprintk("!!!Your kernel not setup MSR instruction but "
"CPU have it %d\n", msr);
"CPU have it %x\n", msr);
#endif

for (src = __ivt_start; src < __ivt_end; src++, dst++)
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/block/nbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
#define DBG_BLKDEV 0x0100
#define DBG_RX 0x0200
#define DBG_TX 0x0400
static DEFINE_MUTEX(nbd_mutex);
static unsigned int debugflags;
#endif /* NDEBUG */

Expand Down Expand Up @@ -718,11 +717,9 @@ static int nbd_ioctl(struct block_device *bdev, fmode_t mode,
dprintk(DBG_IOCTL, "%s: nbd_ioctl cmd=%s(0x%x) arg=%lu\n",
lo->disk->disk_name, ioctl_cmd_to_ascii(cmd), cmd, arg);

mutex_lock(&nbd_mutex);
mutex_lock(&lo->tx_lock);
error = __nbd_ioctl(bdev, lo, cmd, arg);
mutex_unlock(&lo->tx_lock);
mutex_unlock(&nbd_mutex);

return error;
}
Expand Down
28 changes: 22 additions & 6 deletions trunk/drivers/gpio/pca953x.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ struct pca953x_chip {
unsigned gpio_start;
uint16_t reg_output;
uint16_t reg_direction;
struct mutex i2c_lock;

#ifdef CONFIG_GPIO_PCA953X_IRQ
struct mutex irq_lock;
Expand Down Expand Up @@ -119,13 +120,17 @@ static int pca953x_gpio_direction_input(struct gpio_chip *gc, unsigned off)

chip = container_of(gc, struct pca953x_chip, gpio_chip);

mutex_lock(&chip->i2c_lock);
reg_val = chip->reg_direction | (1u << off);
ret = pca953x_write_reg(chip, PCA953X_DIRECTION, reg_val);
if (ret)
return ret;
goto exit;

chip->reg_direction = reg_val;
return 0;
ret = 0;
exit:
mutex_unlock(&chip->i2c_lock);
return ret;
}

static int pca953x_gpio_direction_output(struct gpio_chip *gc,
Expand All @@ -137,6 +142,7 @@ static int pca953x_gpio_direction_output(struct gpio_chip *gc,

chip = container_of(gc, struct pca953x_chip, gpio_chip);

mutex_lock(&chip->i2c_lock);
/* set output level */
if (val)
reg_val = chip->reg_output | (1u << off);
Expand All @@ -145,18 +151,21 @@ static int pca953x_gpio_direction_output(struct gpio_chip *gc,

ret = pca953x_write_reg(chip, PCA953X_OUTPUT, reg_val);
if (ret)
return ret;
goto exit;

chip->reg_output = reg_val;

/* then direction */
reg_val = chip->reg_direction & ~(1u << off);
ret = pca953x_write_reg(chip, PCA953X_DIRECTION, reg_val);
if (ret)
return ret;
goto exit;

chip->reg_direction = reg_val;
return 0;
ret = 0;
exit:
mutex_unlock(&chip->i2c_lock);
return ret;
}

static int pca953x_gpio_get_value(struct gpio_chip *gc, unsigned off)
Expand All @@ -167,7 +176,9 @@ static int pca953x_gpio_get_value(struct gpio_chip *gc, unsigned off)

chip = container_of(gc, struct pca953x_chip, gpio_chip);

mutex_lock(&chip->i2c_lock);
ret = pca953x_read_reg(chip, PCA953X_INPUT, &reg_val);
mutex_unlock(&chip->i2c_lock);
if (ret < 0) {
/* NOTE: diagnostic already emitted; that's all we should
* do unless gpio_*_value_cansleep() calls become different
Expand All @@ -187,16 +198,19 @@ static void pca953x_gpio_set_value(struct gpio_chip *gc, unsigned off, int val)

chip = container_of(gc, struct pca953x_chip, gpio_chip);

mutex_lock(&chip->i2c_lock);
if (val)
reg_val = chip->reg_output | (1u << off);
else
reg_val = chip->reg_output & ~(1u << off);

ret = pca953x_write_reg(chip, PCA953X_OUTPUT, reg_val);
if (ret)
return;
goto exit;

chip->reg_output = reg_val;
exit:
mutex_unlock(&chip->i2c_lock);
}

static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios)
Expand Down Expand Up @@ -517,6 +531,8 @@ static int __devinit pca953x_probe(struct i2c_client *client,

chip->names = pdata->names;

mutex_init(&chip->i2c_lock);

/* initialize cached registers from their original values.
* we can't share this chip with another i2c master.
*/
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/rtc/rtc-proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,16 @@ static int rtc_proc_show(struct seq_file *seq, void *offset)

static int rtc_proc_open(struct inode *inode, struct file *file)
{
int ret;
struct rtc_device *rtc = PDE(inode)->data;

if (!try_module_get(THIS_MODULE))
return -ENODEV;

return single_open(file, rtc_proc_show, rtc);
ret = single_open(file, rtc_proc_show, rtc);
if (ret)
module_put(THIS_MODULE);
return ret;
}

static int rtc_proc_release(struct inode *inode, struct file *file)
Expand Down
Loading

0 comments on commit a72b8eb

Please sign in to comment.