mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-20 14:16:02 +00:00
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] Fixe the definition of PTRS_PER_PGD [MIPS] au1000: Fix gpio direction
This commit is contained in:
commit
1126388609
2 changed files with 4 additions and 2 deletions
|
@ -61,7 +61,8 @@ static int au1xxx_gpio2_direction_input(unsigned gpio)
|
||||||
static int au1xxx_gpio2_direction_output(unsigned gpio, int value)
|
static int au1xxx_gpio2_direction_output(unsigned gpio, int value)
|
||||||
{
|
{
|
||||||
gpio -= AU1XXX_GPIO_BASE;
|
gpio -= AU1XXX_GPIO_BASE;
|
||||||
gpio2->dir = (0x01 << gpio) | (value << gpio);
|
gpio2->dir |= 0x01 << gpio;
|
||||||
|
gpio2->output = (GPIO2_OUTPUT_ENABLE_MASK << gpio) | (value << gpio);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,6 +91,7 @@ static int au1xxx_gpio1_direction_input(unsigned gpio)
|
||||||
static int au1xxx_gpio1_direction_output(unsigned gpio, int value)
|
static int au1xxx_gpio1_direction_output(unsigned gpio, int value)
|
||||||
{
|
{
|
||||||
gpio1->trioutclr = (0x01 & gpio);
|
gpio1->trioutclr = (0x01 & gpio);
|
||||||
|
au1xxx_gpio1_write(gpio, value);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
|
||||||
#define PMD_ORDER 1
|
#define PMD_ORDER 1
|
||||||
#define PTE_ORDER 0
|
#define PTE_ORDER 0
|
||||||
|
|
||||||
#define PTRS_PER_PGD ((PAGE_SIZE << PGD_ORDER) / sizeof(pgd_t))
|
#define PTRS_PER_PGD (USER_PTRS_PER_PGD * 2)
|
||||||
#define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t))
|
#define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t))
|
||||||
|
|
||||||
#define USER_PTRS_PER_PGD (0x80000000UL/PGDIR_SIZE)
|
#define USER_PTRS_PER_PGD (0x80000000UL/PGDIR_SIZE)
|
||||||
|
|
Loading…
Reference in a new issue