Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 348227
b: refs/heads/master
c: 4956964
h: refs/heads/master
i:
  348225: 8f3f1f2
  348223: b4676ae
v: v3
  • Loading branch information
Linus Torvalds committed Jan 4, 2013
1 parent c717fd5 commit d853d1a
Show file tree
Hide file tree
Showing 31 changed files with 257 additions and 166 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: 6ae141718e3f9c7e2c620e999c86612a7f415bb1
refs/heads/master: 49569646b2413ee1a4fb7c4537fca058ac22292e
47 changes: 47 additions & 0 deletions trunk/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
CSR SiRFprimaII pinmux controller

Required properties:
- compatible : "sirf,prima2-pinctrl"
- reg : Address range of the pinctrl registers
- interrupts : Interrupts used by every GPIO group
- gpio-controller : Indicates this device is a GPIO controller
- interrupt-controller : Marks the device node as an interrupt controller
Optional properties:
- sirf,pullups : if n-th bit of m-th bank is set, set a pullup on GPIO-n of bank m
- sirf,pulldowns : if n-th bit of m-th bank is set, set a pulldown on GPIO-n of bank m

Please refer to pinctrl-bindings.txt in this directory for details of the common
pinctrl bindings used by client devices.

SiRFprimaII's pinmux nodes act as a container for an abitrary number of subnodes.
Each of these subnodes represents some desired configuration for a group of pins.

Required subnode-properties:
- sirf,pins : An array of strings. Each string contains the name of a group.
- sirf,function: A string containing the name of the function to mux to the
group.

Valid values for group and function names can be found from looking at the
group and function arrays in driver files:
drivers/pinctrl/pinctrl-sirf.c

For example, pinctrl might have subnodes like the following:
uart2_pins_a: uart2@0 {
uart {
sirf,pins = "uart2grp";
sirf,function = "uart2";
};
};
uart2_noflow_pins_a: uart2@1 {
uart {
sirf,pins = "uart2_nostreamctrlgrp";
sirf,function = "uart2_nostreamctrl";
};
};

For a specific board, if it wants to use uart2 without hardware flow control,
it can add the following to its board-specific .dts file.
uart2: uart@0xb0070000 {
pinctrl-names = "default";
pinctrl-0 = <&uart2_noflow_pins_a>;
}
10 changes: 10 additions & 0 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3273,6 +3273,16 @@ F: Documentation/filesystems/caching/
F: fs/fscache/
F: include/linux/fscache*.h

F2FS FILE SYSTEM
M: Jaegeuk Kim <jaegeuk.kim@samsung.com>
L: linux-f2fs-devel@lists.sourceforge.net
W: http://en.wikipedia.org/wiki/F2FS
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git
S: Maintained
F: Documentation/filesystems/f2fs.txt
F: fs/f2fs/
F: include/linux/f2fs_fs.h

FUJITSU FR-V (FRV) PORT
M: David Howells <dhowells@redhat.com>
S: Maintained
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/arm/boot/dts/dbx5x0.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@
gpio-bank = <8>;
};

pinctrl {
pinctrl@80157000 {
// This is actually the PRCMU base address
reg = <0x80157000 0x2000>;
compatible = "stericsson,nmk_pinctrl";
};

Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/arm/mach-ux500/cpu-db8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL),
OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL),
/* Requires device name bindings. */
OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL),
OF_DEV_AUXDATA("stericsson,nmk_pinctrl", U8500_PRCMU_BASE,
"pinctrl-db8500", NULL),
/* Requires clock name and DMA bindings. */
OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000,
"ux500-msp-i2s.0", &msp0_platform_data),
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/ia64/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@



#define NR_syscalls 311 /* length of syscall table */
#define NR_syscalls 312 /* length of syscall table */

/*
* The following defines stop scripts/checksyscalls.sh from complaining about
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/ia64/include/uapi/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,5 +324,6 @@
#define __NR_process_vm_readv 1332
#define __NR_process_vm_writev 1333
#define __NR_accept4 1334
#define __NR_finit_module 1335

#endif /* _UAPI_ASM_IA64_UNISTD_H */
1 change: 1 addition & 0 deletions trunk/arch/ia64/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -1785,6 +1785,7 @@ sys_call_table:
data8 sys_process_vm_readv
data8 sys_process_vm_writev
data8 sys_accept4
data8 sys_finit_module // 1335

.org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls
#endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */
5 changes: 0 additions & 5 deletions trunk/arch/powerpc/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,13 +770,8 @@ void update_vsyscall_old(struct timespec *wall_time, struct timespec *wtm,

void update_vsyscall_tz(void)
{
/* Make userspace gettimeofday spin until we're done. */
++vdso_data->tb_update_count;
smp_mb();
vdso_data->tz_minuteswest = sys_tz.tz_minuteswest;
vdso_data->tz_dsttime = sys_tz.tz_dsttime;
smp_mb();
++vdso_data->tb_update_count;
}

static void __init clocksource_init(void)
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/powerpc/platforms/40x/ppc40x_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ static const char * const board[] __initconst = {
"amcc,makalu",
"apm,klondike",
"est,hotfoot",
"plathome,obs600"
"plathome,obs600",
NULL
};

static int __init ppc40x_probe(void)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/pinctrl/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ static struct pinctrl *create_pinctrl(struct device *dev)
}
}

/* Add the pinmux to the global list */
/* Add the pinctrl handle to the global list */
list_add_tail(&p->node, &pinctrl_list);

return p;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/pinctrl/pinctrl-at91.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ static int at91_dt_node_to_map(struct pinctrl_dev *pctldev,
/* create mux map */
parent = of_get_parent(np);
if (!parent) {
kfree(new_map);
devm_kfree(pctldev->dev, new_map);
return -EINVAL;
}
new_map[0].type = PIN_MAP_TYPE_MUX_GROUP;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/pinctrl/pinctrl-imx53.c
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,7 @@ static struct imx_pin_reg imx53_pin_regs[] = {
IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 0, 0x7F8, 1), /* MX53_PAD_GPIO_8__ESAI1_TX5_RX0 */
IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 1, 0x000, 0), /* MX53_PAD_GPIO_8__GPIO1_8 */
IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 2, 0x000, 0), /* MX53_PAD_GPIO_8__EPIT2_EPITO */
IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 3, 0x760, 3), /* MX53_PAD_GPIO_8__CAN1_RXCAN */
IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 3, 0x760, 2), /* MX53_PAD_GPIO_8__CAN1_RXCAN */
IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 4, 0x880, 5), /* MX53_PAD_GPIO_8__UART2_RXD_MUX */
IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 5, 0x000, 0), /* MX53_PAD_GPIO_8__FIRI_TXD */
IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 6, 0x000, 0), /* MX53_PAD_GPIO_8__SPDIF_SRCLK */
Expand Down
11 changes: 10 additions & 1 deletion trunk/drivers/pinctrl/pinctrl-nomadik.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ static void nmk_prcm_altcx_set_mode(struct nmk_pinctrl *npct,
const struct prcm_gpiocr_altcx_pin_desc *pin_desc;
const u16 *gpiocr_regs;

if (!npct->prcm_base)
return;

if (alt_num > PRCM_IDX_GPIOCR_ALTC_MAX) {
dev_err(npct->dev, "PRCM GPIOCR: alternate-C%i is invalid\n",
alt_num);
Expand Down Expand Up @@ -682,6 +685,9 @@ static int nmk_prcm_gpiocr_get_mode(struct pinctrl_dev *pctldev, int gpio)
const struct prcm_gpiocr_altcx_pin_desc *pin_desc;
const u16 *gpiocr_regs;

if (!npct->prcm_base)
return NMK_GPIO_ALT_C;

for (i = 0; i < npct->soc->npins_altcx; i++) {
if (npct->soc->altcx_pins[i].pin == gpio)
break;
Expand Down Expand Up @@ -1887,9 +1893,12 @@ static int nmk_pinctrl_probe(struct platform_device *pdev)
"failed to ioremap PRCM registers\n");
return -ENOMEM;
}
} else {
} else if (version == PINCTRL_NMK_STN8815) {
dev_info(&pdev->dev,
"No PRCM base, assume no ALT-Cx control is available\n");
} else {
dev_err(&pdev->dev, "missing PRCM base address\n");
return -EINVAL;
}

/*
Expand Down
48 changes: 48 additions & 0 deletions trunk/drivers/pinctrl/pinctrl-sirf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1663,6 +1663,44 @@ const struct irq_domain_ops sirfsoc_gpio_irq_simple_ops = {
.xlate = irq_domain_xlate_twocell,
};

static void sirfsoc_gpio_set_pullup(const u32 *pullups)
{
int i, n;
const unsigned long *p = (const unsigned long *)pullups;

for (i = 0; i < SIRFSOC_GPIO_NO_OF_BANKS; i++) {
n = find_first_bit(p + i, BITS_PER_LONG);
while (n < BITS_PER_LONG) {
u32 offset = SIRFSOC_GPIO_CTRL(i, n);
u32 val = readl(sgpio_bank[i].chip.regs + offset);
val |= SIRFSOC_GPIO_CTL_PULL_MASK;
val |= SIRFSOC_GPIO_CTL_PULL_HIGH;
writel(val, sgpio_bank[i].chip.regs + offset);

n = find_next_bit(p + i, BITS_PER_LONG, n + 1);
}
}
}

static void sirfsoc_gpio_set_pulldown(const u32 *pulldowns)
{
int i, n;
const unsigned long *p = (const unsigned long *)pulldowns;

for (i = 0; i < SIRFSOC_GPIO_NO_OF_BANKS; i++) {
n = find_first_bit(p + i, BITS_PER_LONG);
while (n < BITS_PER_LONG) {
u32 offset = SIRFSOC_GPIO_CTRL(i, n);
u32 val = readl(sgpio_bank[i].chip.regs + offset);
val |= SIRFSOC_GPIO_CTL_PULL_MASK;
val &= ~SIRFSOC_GPIO_CTL_PULL_HIGH;
writel(val, sgpio_bank[i].chip.regs + offset);

n = find_next_bit(p + i, BITS_PER_LONG, n + 1);
}
}
}

static int sirfsoc_gpio_probe(struct device_node *np)
{
int i, err = 0;
Expand All @@ -1671,6 +1709,8 @@ static int sirfsoc_gpio_probe(struct device_node *np)
struct platform_device *pdev;
bool is_marco = false;

u32 pullups[SIRFSOC_GPIO_NO_OF_BANKS], pulldowns[SIRFSOC_GPIO_NO_OF_BANKS];

pdev = of_find_device_by_node(np);
if (!pdev)
return -ENODEV;
Expand Down Expand Up @@ -1726,6 +1766,14 @@ static int sirfsoc_gpio_probe(struct device_node *np)
irq_set_handler_data(bank->parent_irq, bank);
}

if (!of_property_read_u32_array(np, "sirf,pullups", pullups,
SIRFSOC_GPIO_NO_OF_BANKS))
sirfsoc_gpio_set_pullup(pullups);

if (!of_property_read_u32_array(np, "sirf,pulldowns", pulldowns,
SIRFSOC_GPIO_NO_OF_BANKS))
sirfsoc_gpio_set_pulldown(pulldowns);

return 0;

out:
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/f2fs/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/backing-dev.h>
#include <linux/blkdev.h>
#include <linux/bio.h>
#include <linux/prefetch.h>

#include "f2fs.h"
#include "node.h"
Expand Down
16 changes: 9 additions & 7 deletions trunk/fs/f2fs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/fs.h>
#include <linux/f2fs_fs.h>
#include "f2fs.h"
#include "node.h"
#include "acl.h"

static unsigned long dir_blocks(struct inode *inode)
Expand Down Expand Up @@ -74,7 +75,7 @@ static unsigned long dir_block_index(unsigned int level, unsigned int idx)
return bidx;
}

static bool early_match_name(const char *name, int namelen,
static bool early_match_name(const char *name, size_t namelen,
f2fs_hash_t namehash, struct f2fs_dir_entry *de)
{
if (le16_to_cpu(de->name_len) != namelen)
Expand All @@ -87,7 +88,7 @@ static bool early_match_name(const char *name, int namelen,
}

static struct f2fs_dir_entry *find_in_block(struct page *dentry_page,
const char *name, int namelen, int *max_slots,
const char *name, size_t namelen, int *max_slots,
f2fs_hash_t namehash, struct page **res_page)
{
struct f2fs_dir_entry *de;
Expand Down Expand Up @@ -126,7 +127,7 @@ static struct f2fs_dir_entry *find_in_block(struct page *dentry_page,
}

static struct f2fs_dir_entry *find_in_level(struct inode *dir,
unsigned int level, const char *name, int namelen,
unsigned int level, const char *name, size_t namelen,
f2fs_hash_t namehash, struct page **res_page)
{
int s = GET_DENTRY_SLOTS(namelen);
Expand Down Expand Up @@ -181,7 +182,7 @@ struct f2fs_dir_entry *f2fs_find_entry(struct inode *dir,
struct qstr *child, struct page **res_page)
{
const char *name = child->name;
int namelen = child->len;
size_t namelen = child->len;
unsigned long npages = dir_blocks(dir);
struct f2fs_dir_entry *de = NULL;
f2fs_hash_t name_hash;
Expand Down Expand Up @@ -308,6 +309,7 @@ static int init_inode_metadata(struct inode *inode, struct dentry *dentry)
ipage = get_node_page(F2FS_SB(dir->i_sb), inode->i_ino);
if (IS_ERR(ipage))
return PTR_ERR(ipage);
set_cold_node(inode, ipage);
init_dent_inode(dentry, ipage);
f2fs_put_page(ipage, 1);
}
Expand Down Expand Up @@ -381,7 +383,7 @@ int f2fs_add_link(struct dentry *dentry, struct inode *inode)
struct inode *dir = dentry->d_parent->d_inode;
struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb);
const char *name = dentry->d_name.name;
int namelen = dentry->d_name.len;
size_t namelen = dentry->d_name.len;
struct page *dentry_page = NULL;
struct f2fs_dentry_block *dentry_blk = NULL;
int slots = GET_DENTRY_SLOTS(namelen);
Expand Down Expand Up @@ -540,13 +542,13 @@ int f2fs_make_empty(struct inode *inode, struct inode *parent)

de = &dentry_blk->dentry[0];
de->name_len = cpu_to_le16(1);
de->hash_code = 0;
de->hash_code = f2fs_dentry_hash(".", 1);
de->ino = cpu_to_le32(inode->i_ino);
memcpy(dentry_blk->filename[0], ".", 1);
set_de_type(de, inode);

de = &dentry_blk->dentry[1];
de->hash_code = 0;
de->hash_code = f2fs_dentry_hash("..", 2);
de->name_len = cpu_to_le16(2);
de->ino = cpu_to_le32(parent->i_ino);
memcpy(dentry_blk->filename[1], "..", 2);
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/f2fs/f2fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ int f2fs_sync_fs(struct super_block *, int);
/*
* hash.c
*/
f2fs_hash_t f2fs_dentry_hash(const char *, int);
f2fs_hash_t f2fs_dentry_hash(const char *, size_t);

/*
* node.c
Expand Down
10 changes: 6 additions & 4 deletions trunk/fs/f2fs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,17 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
if (need_to_sync_dir(sbi, inode))
need_cp = true;

f2fs_write_inode(inode, NULL);

if (need_cp) {
/* all the dirty node pages should be flushed for POR */
ret = f2fs_sync_fs(inode->i_sb, 1);
clear_inode_flag(F2FS_I(inode), FI_NEED_CP);
} else {
while (sync_node_pages(sbi, inode->i_ino, &wbc) == 0)
f2fs_write_inode(inode, NULL);
/* if there is no written node page, write its inode page */
while (!sync_node_pages(sbi, inode->i_ino, &wbc)) {
ret = f2fs_write_inode(inode, NULL);
if (ret)
goto out;
}
filemap_fdatawait_range(sbi->node_inode->i_mapping,
0, LONG_MAX);
}
Expand Down
Loading

0 comments on commit d853d1a

Please sign in to comment.