Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233169
b: refs/heads/master
c: 6b155c8
h: refs/heads/master
i:
  233167: 27e4aa2
v: v3
  • Loading branch information
David Teigland committed Feb 11, 2011
1 parent 50a5f6f commit 5f79cfe
Show file tree
Hide file tree
Showing 39 changed files with 170 additions and 232 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: 3aec46c1e0be28ead67f53c2cade6453a7fba6e6
refs/heads/master: 6b155c8fd4d239f7d883d455bbad1be47724bbfc
1 change: 0 additions & 1 deletion trunk/arch/arm/mach-s5pv310/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ 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: 2 additions & 0 deletions trunk/arch/arm/mach-s5pv310/include/mach/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@
#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: 1 addition & 4 deletions trunk/arch/arm/mach-s5pv310/include/mach/sysmmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
#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 @@ -35,7 +32,7 @@ enum s5pv310_sysmmu_ips {
SYSMMU_MFC_R,
};

static char *sysmmu_ips_name[S5PV310_SYSMMU_TOTAL_IPNUM] = {
static char *sysmmu_ips_name[S5P_SYSMMU_TOTAL_IPNUM] = {
"SYSMMU_MDMA" ,
"SYSMMU_SSS" ,
"SYSMMU_FIMC0" ,
Expand Down
24 changes: 16 additions & 8 deletions trunk/arch/arm/plat-s5p/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@ 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 @@ -74,3 +66,19 @@ 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,7 +19,6 @@ 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 @@ -31,3 +30,4 @@ 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: 23 additions & 0 deletions trunk/arch/arm/plat-s5p/include/plat/sysmmu.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* linux/arch/arm/plat-s5p/include/plat/sysmmu.h
*
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
* http://www.samsung.com/
*
* Samsung sysmmu driver
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef __ASM_PLAT_S5P_SYSMMU_H
#define __ASM_PLAT_S5P_SYSMMU_H __FILE__

/* debug macro */
#ifdef CONFIG_S5P_SYSMMU_DEBUG
#define sysmmu_debug(fmt, arg...) printk(KERN_INFO "[%s] " fmt, __func__, ## arg)
#else
#define sysmmu_debug(fmt, arg...) do { } while (0)
#endif

#endif /* __ASM_PLAT_S5P_SYSMMU_H */
4 changes: 3 additions & 1 deletion trunk/arch/arm/plat-s5p/sysmmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#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 @@ -121,7 +123,7 @@ static int s5p_sysmmu_set_tablebase(sysmmu_ips ips)
: "=r" (pg) : : "cc"); \
pg &= ~0x3fff;

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

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

#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>

#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
#ifdef CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR

static inline unsigned long arch_local_irq_save(void)
{
Expand Down
27 changes: 14 additions & 13 deletions trunk/arch/microblaze/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -411,19 +411,20 @@ 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 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);
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");

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(0, pvr0);
get_single_pvr(0x00, pvr0);
pr_debug("%s: pvr0 is 0x%08x\n", __func__, pvr0);

if (pvr0 & PVR0_PVR_FULL_MASK)
Expand Down
15 changes: 8 additions & 7 deletions trunk/arch/microblaze/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,15 @@ real_start:
andi r1, r1, ~2
mts rmsr, r1
/*
* 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
* 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.
*/
msrclr r8, 0 /* clear nothing - just read msr for test */
cmpu r8, r8, r1 /* r1 must contain msr reg content */
/* 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

/* 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 %x\n", msr);
"CPU don't have it %d\n", msr);
#else
if (!msr)
eprintk("!!!Your kernel not setup MSR instruction but "
"CPU have it %x\n", msr);
"CPU have it %d\n", msr);
#endif

for (src = __ivt_start; src < __ivt_end; src++, dst++)
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/block/nbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#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 @@ -717,9 +718,11 @@ 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
18 changes: 2 additions & 16 deletions trunk/drivers/char/tpm/tpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,11 +577,9 @@ void tpm_get_timeouts(struct tpm_chip *chip)
if (rc)
return;

if (be32_to_cpu(tpm_cmd.header.out.return_code) != 0 ||
be32_to_cpu(tpm_cmd.header.out.length)
!= sizeof(tpm_cmd.header.out) + sizeof(u32) + 3 * sizeof(u32))
if (be32_to_cpu(tpm_cmd.header.out.return_code)
!= 3 * sizeof(u32))
return;

duration_cap = &tpm_cmd.params.getcap_out.cap.duration;
chip->vendor.duration[TPM_SHORT] =
usecs_to_jiffies(be32_to_cpu(duration_cap->tpm_short));
Expand Down Expand Up @@ -941,18 +939,6 @@ ssize_t tpm_show_caps_1_2(struct device * dev,
}
EXPORT_SYMBOL_GPL(tpm_show_caps_1_2);

ssize_t tpm_show_timeouts(struct device *dev, struct device_attribute *attr,
char *buf)
{
struct tpm_chip *chip = dev_get_drvdata(dev);

return sprintf(buf, "%d %d %d\n",
jiffies_to_usecs(chip->vendor.duration[TPM_SHORT]),
jiffies_to_usecs(chip->vendor.duration[TPM_MEDIUM]),
jiffies_to_usecs(chip->vendor.duration[TPM_LONG]));
}
EXPORT_SYMBOL_GPL(tpm_show_timeouts);

ssize_t tpm_store_cancel(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/char/tpm/tpm.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ extern ssize_t tpm_show_owned(struct device *, struct device_attribute *attr,
char *);
extern ssize_t tpm_show_temp_deactivated(struct device *,
struct device_attribute *attr, char *);
extern ssize_t tpm_show_timeouts(struct device *,
struct device_attribute *attr, char *);

struct tpm_chip;

Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/char/tpm/tpm_tis.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ static DEVICE_ATTR(temp_deactivated, S_IRUGO, tpm_show_temp_deactivated,
NULL);
static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps_1_2, NULL);
static DEVICE_ATTR(cancel, S_IWUSR | S_IWGRP, NULL, tpm_store_cancel);
static DEVICE_ATTR(timeouts, S_IRUGO, tpm_show_timeouts, NULL);

static struct attribute *tis_attrs[] = {
&dev_attr_pubek.attr,
Expand All @@ -386,8 +385,7 @@ static struct attribute *tis_attrs[] = {
&dev_attr_owned.attr,
&dev_attr_temp_deactivated.attr,
&dev_attr_caps.attr,
&dev_attr_cancel.attr,
&dev_attr_timeouts.attr, NULL,
&dev_attr_cancel.attr, NULL,
};

static struct attribute_group tis_attr_grp = {
Expand Down
Loading

0 comments on commit 5f79cfe

Please sign in to comment.