Merge ../linux-2.6
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
pci_unmap_sg(alpha_gendev_to_pci(dev), sg, nents, dir)
|
||||
#define dma_supported(dev, mask) \
|
||||
pci_dma_supported(alpha_gendev_to_pci(dev), mask)
|
||||
#define dma_mapping_error(addr) \
|
||||
pci_dma_mapping_error(addr)
|
||||
#define dma_mapping_error(dev, addr) \
|
||||
pci_dma_mapping_error(alpha_gendev_to_pci(dev), addr)
|
||||
|
||||
#else /* no PCI - no IOMMU. */
|
||||
|
||||
@@ -45,7 +45,7 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
|
||||
#define dma_unmap_page(dev, addr, size, dir) ((void)0)
|
||||
#define dma_unmap_sg(dev, sg, nents, dir) ((void)0)
|
||||
|
||||
#define dma_mapping_error(addr) (0)
|
||||
#define dma_mapping_error(dev, addr) (0)
|
||||
|
||||
#endif /* !CONFIG_PCI */
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* linux/include/asm-alpha/ide.h
|
||||
*
|
||||
* Copyright (C) 1994-1996 Linus Torvalds & authors
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file contains the alpha architecture specific IDE code.
|
||||
*/
|
||||
|
||||
#ifndef __ASMalpha_IDE_H
|
||||
#define __ASMalpha_IDE_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
static inline int ide_default_irq(unsigned long base)
|
||||
{
|
||||
switch (base) {
|
||||
case 0x1f0: return 14;
|
||||
case 0x170: return 15;
|
||||
case 0x1e8: return 11;
|
||||
case 0x168: return 10;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static inline unsigned long ide_default_io_base(int index)
|
||||
{
|
||||
switch (index) {
|
||||
case 0: return 0x1f0;
|
||||
case 1: return 0x170;
|
||||
case 2: return 0x1e8;
|
||||
case 3: return 0x168;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
#include <asm-generic/ide_iops.h>
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* __ASMalpha_IDE_H */
|
||||
@@ -1,6 +0,0 @@
|
||||
#ifndef __LINUX_KVM_ALPHA_H
|
||||
#define __LINUX_KVM_ALPHA_H
|
||||
|
||||
/* alpha does not support KVM */
|
||||
|
||||
#endif
|
||||
@@ -1,17 +0,0 @@
|
||||
/* $Id: namei.h,v 1.1 1996/12/13 14:48:21 jj Exp $
|
||||
* linux/include/asm-alpha/namei.h
|
||||
*
|
||||
* Included from linux/fs/namei.c
|
||||
*/
|
||||
|
||||
#ifndef __ALPHA_NAMEI_H
|
||||
#define __ALPHA_NAMEI_H
|
||||
|
||||
/* This dummy routine maybe changed to something useful
|
||||
* for /usr/gnemul/ emulation stuff.
|
||||
* Look at asm-sparc/namei.h for details.
|
||||
*/
|
||||
|
||||
#define __emul_prefix() NULL
|
||||
|
||||
#endif /* __ALPHA_NAMEI_H */
|
||||
@@ -80,9 +80,6 @@ typedef struct page *pgtable_t;
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
/* to align the pointer to the (next) page boundary */
|
||||
#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
|
||||
|
||||
#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
|
||||
#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
|
||||
#ifndef CONFIG_DISCONTIGMEM
|
||||
|
||||
@@ -106,7 +106,7 @@ extern dma_addr_t pci_map_page(struct pci_dev *, struct page *,
|
||||
/* Test for pci_map_single or pci_map_page having generated an error. */
|
||||
|
||||
static inline int
|
||||
pci_dma_mapping_error(dma_addr_t dma_addr)
|
||||
pci_dma_mapping_error(struct pci_dev *pdev, dma_addr_t dma_addr)
|
||||
{
|
||||
return dma_addr == 0;
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#include <linux/semaphore.h>
|
||||
@@ -62,4 +62,9 @@
|
||||
|
||||
#define SO_MARK 36
|
||||
|
||||
/* O_NONBLOCK clashes with the bits used for socket types. Therefore we
|
||||
* have to define SOCK_NONBLOCK to a different value here.
|
||||
*/
|
||||
#define SOCK_NONBLOCK 0x40000000
|
||||
|
||||
#endif /* _ASM_SOCKET_H */
|
||||
|
||||
@@ -50,10 +50,8 @@ register struct thread_info *__current_thread_info __asm__("$8");
|
||||
#define current_thread_info() __current_thread_info
|
||||
|
||||
/* Thread information allocation. */
|
||||
#define THREAD_SIZE_ORDER 1
|
||||
#define THREAD_SIZE (2*PAGE_SIZE)
|
||||
#define alloc_thread_info(tsk) \
|
||||
((struct thread_info *) __get_free_pages(GFP_KERNEL,1))
|
||||
#define free_thread_info(ti) free_pages((unsigned long) (ti), 1)
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* include/asm-arm/arch-at91/at91_ecc.h
|
||||
*
|
||||
* Error Corrected Code Controller (ECC) - System peripherals regsters.
|
||||
* Based on AT91SAM9260 datasheet revision B.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef AT91_ECC_H
|
||||
#define AT91_ECC_H
|
||||
|
||||
#define AT91_ECC_CR 0x00 /* Control register */
|
||||
#define AT91_ECC_RST (1 << 0) /* Reset parity */
|
||||
|
||||
#define AT91_ECC_MR 0x04 /* Mode register */
|
||||
#define AT91_ECC_PAGESIZE (3 << 0) /* Page Size */
|
||||
#define AT91_ECC_PAGESIZE_528 (0)
|
||||
#define AT91_ECC_PAGESIZE_1056 (1)
|
||||
#define AT91_ECC_PAGESIZE_2112 (2)
|
||||
#define AT91_ECC_PAGESIZE_4224 (3)
|
||||
|
||||
#define AT91_ECC_SR 0x08 /* Status register */
|
||||
#define AT91_ECC_RECERR (1 << 0) /* Recoverable Error */
|
||||
#define AT91_ECC_ECCERR (1 << 1) /* ECC Single Bit Error */
|
||||
#define AT91_ECC_MULERR (1 << 2) /* Multiple Errors */
|
||||
|
||||
#define AT91_ECC_PR 0x0c /* Parity register */
|
||||
#define AT91_ECC_BITADDR (0xf << 0) /* Bit Error Address */
|
||||
#define AT91_ECC_WORDADDR (0xfff << 4) /* Word Error Address */
|
||||
|
||||
#define AT91_ECC_NPR 0x10 /* NParity register */
|
||||
#define AT91_ECC_NPARITY (0xffff << 0) /* NParity */
|
||||
|
||||
#endif
|
||||
@@ -89,7 +89,7 @@ struct at91_usbh_data {
|
||||
extern void __init at91_add_device_usbh(struct at91_usbh_data *data);
|
||||
|
||||
/* NAND / SmartMedia */
|
||||
struct at91_nand_data {
|
||||
struct atmel_nand_data {
|
||||
u8 enable_pin; /* chip enable */
|
||||
u8 det_pin; /* card detect */
|
||||
u8 rdy_pin; /* ready/busy */
|
||||
@@ -98,7 +98,7 @@ struct at91_nand_data {
|
||||
u8 bus_width_16; /* buswidth is 16 bit */
|
||||
struct mtd_partition* (*partition_info)(int, int*);
|
||||
};
|
||||
extern void __init at91_add_device_nand(struct at91_nand_data *data);
|
||||
extern void __init at91_add_device_nand(struct atmel_nand_data *data);
|
||||
|
||||
/* I2C*/
|
||||
extern void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_devices);
|
||||
|
||||
@@ -23,6 +23,11 @@
|
||||
#ifndef _INCLUDE_H3600_H_
|
||||
#define _INCLUDE_H3600_H_
|
||||
|
||||
typedef int __bitwise pm_request_t;
|
||||
|
||||
#define PM_SUSPEND ((__force pm_request_t) 1) /* enter D1-D3 */
|
||||
#define PM_RESUME ((__force pm_request_t) 2) /* enter D0 */
|
||||
|
||||
/* generalized support for H3xxx series Compaq Pocket PC's */
|
||||
#define machine_is_h3xxx() (machine_is_h3100() || machine_is_h3600() || machine_is_h3800())
|
||||
|
||||
|
||||
@@ -424,9 +424,9 @@ static inline void flush_anon_page(struct vm_area_struct *vma,
|
||||
}
|
||||
|
||||
#define flush_dcache_mmap_lock(mapping) \
|
||||
write_lock_irq(&(mapping)->tree_lock)
|
||||
spin_lock_irq(&(mapping)->tree_lock)
|
||||
#define flush_dcache_mmap_unlock(mapping) \
|
||||
write_unlock_irq(&(mapping)->tree_lock)
|
||||
spin_unlock_irq(&(mapping)->tree_lock)
|
||||
|
||||
#define flush_icache_user_range(vma,page,addr,len) \
|
||||
flush_dcache_page(page)
|
||||
|
||||
@@ -56,7 +56,7 @@ static inline int dma_is_consistent(struct device *dev, dma_addr_t handle)
|
||||
/*
|
||||
* DMA errors are defined by all-bits-set in the DMA address.
|
||||
*/
|
||||
static inline int dma_mapping_error(dma_addr_t dma_addr)
|
||||
static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
|
||||
{
|
||||
return dma_addr == ~0;
|
||||
}
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#ifndef MAX_HWIFS
|
||||
#define MAX_HWIFS 4
|
||||
#endif
|
||||
|
||||
#define __ide_mm_insw(port,addr,len) readsw(port,addr,len)
|
||||
#define __ide_mm_insl(port,addr,len) readsl(port,addr,len)
|
||||
#define __ide_mm_outsw(port,addr,len) writesw(port,addr,len)
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#ifndef __LINUX_KVM_ARM_H
|
||||
#define __LINUX_KVM_ARM_H
|
||||
|
||||
/* arm does not support KVM */
|
||||
|
||||
#endif
|
||||
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
* linux/include/asm-arm/namei.h
|
||||
*
|
||||
* Routines to handle famous /usr/gnemul
|
||||
* Derived from the Sparc version of this file
|
||||
*
|
||||
* Included from linux/fs/namei.c
|
||||
*/
|
||||
|
||||
#ifndef __ASMARM_NAMEI_H
|
||||
#define __ASMARM_NAMEI_H
|
||||
|
||||
#define ARM_BSD_EMUL "usr/gnemul/bsd/"
|
||||
|
||||
static inline char *__emul_prefix(void)
|
||||
{
|
||||
switch (current->personality) {
|
||||
case PER_BSD:
|
||||
return ARM_BSD_EMUL;
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* __ASMARM_NAMEI_H */
|
||||
@@ -7,6 +7,7 @@
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef _ASMARM_PAGE_NOMMU_H
|
||||
#define _ASMARM_PAGE_NOMMU_H
|
||||
|
||||
@@ -42,9 +43,6 @@ typedef unsigned long pgprot_t;
|
||||
#define __pmd(x) (x)
|
||||
#define __pgprot(x) (x)
|
||||
|
||||
/* to align the pointer to the (next) page boundary */
|
||||
#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
|
||||
|
||||
extern unsigned long memory_start;
|
||||
extern unsigned long memory_end;
|
||||
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
#define PAGE_SIZE (1UL << PAGE_SHIFT)
|
||||
#define PAGE_MASK (~(PAGE_SIZE-1))
|
||||
|
||||
/* to align the pointer to the (next) page boundary */
|
||||
#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
|
||||
@@ -139,8 +139,6 @@ static inline int valid_user_regs(struct pt_regs *regs)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#define pc_pointer(v) \
|
||||
((v) & ~PCMASK)
|
||||
|
||||
@@ -153,10 +151,10 @@ extern unsigned long profile_pc(struct pt_regs *regs);
|
||||
#define profile_pc(regs) instruction_pointer(regs)
|
||||
#endif
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#define predicate(x) ((x) & 0xf0000000)
|
||||
#define PREDICATE_ALWAYS 0xe0000000
|
||||
#endif
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#include <linux/semaphore.h>
|
||||
@@ -97,19 +97,6 @@ static inline struct thread_info *current_thread_info(void)
|
||||
return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
|
||||
}
|
||||
|
||||
/* thread information allocation */
|
||||
#ifdef CONFIG_DEBUG_STACK_USAGE
|
||||
#define alloc_thread_info(tsk) \
|
||||
((struct thread_info *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, \
|
||||
THREAD_SIZE_ORDER))
|
||||
#else
|
||||
#define alloc_thread_info(tsk) \
|
||||
((struct thread_info *)__get_free_pages(GFP_KERNEL, THREAD_SIZE_ORDER))
|
||||
#endif
|
||||
|
||||
#define free_thread_info(info) \
|
||||
free_pages((unsigned long)info, THREAD_SIZE_ORDER);
|
||||
|
||||
#define thread_saved_pc(tsk) \
|
||||
((unsigned long)(pc_pointer(task_thread_info(tsk)->cpu_context.pc)))
|
||||
#define thread_saved_fp(tsk) \
|
||||
|
||||
@@ -97,4 +97,17 @@ struct platform_device *
|
||||
at32_add_device_cf(unsigned int id, unsigned int extint,
|
||||
struct cf_platform_data *data);
|
||||
|
||||
/* NAND / SmartMedia */
|
||||
struct atmel_nand_data {
|
||||
int enable_pin; /* chip enable */
|
||||
int det_pin; /* card detect */
|
||||
int rdy_pin; /* ready/busy */
|
||||
u8 ale; /* address line number connected to ALE */
|
||||
u8 cle; /* address line number connected to CLE */
|
||||
u8 bus_width_16; /* buswidth is 16 bit */
|
||||
struct mtd_partition *(*partition_info)(int size, int *num_partitions);
|
||||
};
|
||||
struct platform_device *
|
||||
at32_add_device_nand(unsigned int id, struct atmel_nand_data *data);
|
||||
|
||||
#endif /* __ASM_ARCH_BOARD_H */
|
||||
|
||||
@@ -35,7 +35,7 @@ static inline int dma_set_mask(struct device *dev, u64 dma_mask)
|
||||
/*
|
||||
* dma_map_single can't fail as it is implemented now.
|
||||
*/
|
||||
static inline int dma_mapping_error(dma_addr_t addr)
|
||||
static inline int dma_mapping_error(struct device *dev, dma_addr_t addr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#ifndef __LINUX_KVM_AVR32_H
|
||||
#define __LINUX_KVM_AVR32_H
|
||||
|
||||
/* avr32 does not support KVM */
|
||||
|
||||
#endif
|
||||
@@ -1,7 +0,0 @@
|
||||
#ifndef __ASM_AVR32_NAMEI_H
|
||||
#define __ASM_AVR32_NAMEI_H
|
||||
|
||||
/* This dummy routine may be changed to something useful */
|
||||
#define __emul_prefix() NULL
|
||||
|
||||
#endif /* __ASM_AVR32_NAMEI_H */
|
||||
@@ -57,9 +57,6 @@ static inline int get_order(unsigned long size)
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
/* Align the pointer to the (next) page boundary */
|
||||
#define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK)
|
||||
|
||||
/*
|
||||
* The hardware maps the virtual addresses 0x80000000 -> 0x9fffffff
|
||||
* permanently to the physical addresses 0x00000000 -> 0x1fffffff when
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#include <linux/semaphore.h>
|
||||
@@ -61,10 +61,6 @@ static inline struct thread_info *current_thread_info(void)
|
||||
return (struct thread_info *)addr;
|
||||
}
|
||||
|
||||
/* thread information allocation */
|
||||
#define alloc_thread_info(ti) \
|
||||
((struct thread_info *) __get_free_pages(GFP_KERNEL, THREAD_SIZE_ORDER))
|
||||
#define free_thread_info(ti) free_pages((unsigned long)(ti), 1)
|
||||
#define get_thread_info(ti) get_task_struct((ti)->task)
|
||||
#define put_thread_info(ti) put_task_struct((ti)->task)
|
||||
|
||||
|
||||
@@ -92,16 +92,20 @@ extern void *l1_data_B_sram_alloc(size_t);
|
||||
extern void *l1_inst_sram_alloc(size_t);
|
||||
extern void *l1_data_sram_alloc(size_t);
|
||||
extern void *l1_data_sram_zalloc(size_t);
|
||||
extern void *l2_sram_alloc(size_t);
|
||||
extern void *l2_sram_zalloc(size_t);
|
||||
extern int l1_data_A_sram_free(const void*);
|
||||
extern int l1_data_B_sram_free(const void*);
|
||||
extern int l1_inst_sram_free(const void*);
|
||||
extern int l1_data_sram_free(const void*);
|
||||
extern int l2_sram_free(const void *);
|
||||
extern int sram_free(const void*);
|
||||
|
||||
#define L1_INST_SRAM 0x00000001
|
||||
#define L1_DATA_A_SRAM 0x00000002
|
||||
#define L1_DATA_B_SRAM 0x00000004
|
||||
#define L1_DATA_SRAM 0x00000006
|
||||
#define L2_SRAM 0x00000008
|
||||
extern void *sram_alloc_with_lsl(size_t, unsigned long);
|
||||
extern int sram_free_with_lsl(const void*);
|
||||
|
||||
@@ -114,7 +118,9 @@ extern struct file_operations dpmc_fops;
|
||||
extern unsigned long _ramstart, _ramend, _rambase;
|
||||
extern unsigned long memory_start, memory_end, physical_mem_end;
|
||||
extern char _stext_l1[], _etext_l1[], _sdata_l1[], _edata_l1[], _sbss_l1[],
|
||||
_ebss_l1[], _l1_lma_start[], _sdata_b_l1[], _ebss_b_l1[];
|
||||
_ebss_l1[], _l1_lma_start[], _sdata_b_l1[], _ebss_b_l1[],
|
||||
_stext_l2[], _etext_l2[], _sdata_l2[], _edata_l2[], _sbss_l2[],
|
||||
_ebss_l2[], _l2_lma_start[];
|
||||
|
||||
#ifdef CONFIG_MTD_UCLINUX
|
||||
extern unsigned long memory_mtd_start, memory_mtd_end, mtd_size;
|
||||
|
||||
@@ -144,8 +144,16 @@ struct dma_channel {
|
||||
void *data;
|
||||
unsigned int dma_enable_flag;
|
||||
unsigned int loopback_flag;
|
||||
#ifdef CONFIG_PM
|
||||
unsigned short saved_peripheral_map;
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
int blackfin_dma_suspend(void);
|
||||
void blackfin_dma_resume(void);
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
* DMA API's
|
||||
*******************************************************************************/
|
||||
|
||||
@@ -7,63 +7,18 @@
|
||||
#ifndef _BLACKFIN_DPMC_H_
|
||||
#define _BLACKFIN_DPMC_H_
|
||||
|
||||
#define SLEEP_MODE 1
|
||||
#define DEEP_SLEEP_MODE 2
|
||||
#define ACTIVE_PLL_DISABLED 3
|
||||
#define FULLON_MODE 4
|
||||
#define ACTIVE_PLL_ENABLED 5
|
||||
#define HIBERNATE_MODE 6
|
||||
|
||||
#define IOCTL_FULL_ON_MODE _IO('s', 0xA0)
|
||||
#define IOCTL_ACTIVE_MODE _IO('s', 0xA1)
|
||||
#define IOCTL_SLEEP_MODE _IO('s', 0xA2)
|
||||
#define IOCTL_DEEP_SLEEP_MODE _IO('s', 0xA3)
|
||||
#define IOCTL_HIBERNATE_MODE _IO('s', 0xA4)
|
||||
#define IOCTL_CHANGE_FREQUENCY _IOW('s', 0xA5, unsigned long)
|
||||
#define IOCTL_CHANGE_VOLTAGE _IOW('s', 0xA6, unsigned long)
|
||||
#define IOCTL_SET_CCLK _IOW('s', 0xA7, unsigned long)
|
||||
#define IOCTL_SET_SCLK _IOW('s', 0xA8, unsigned long)
|
||||
#define IOCTL_GET_PLLSTATUS _IOW('s', 0xA9, unsigned long)
|
||||
#define IOCTL_GET_CORECLOCK _IOW('s', 0xAA, unsigned long)
|
||||
#define IOCTL_GET_SYSTEMCLOCK _IOW('s', 0xAB, unsigned long)
|
||||
#define IOCTL_GET_VCO _IOW('s', 0xAC, unsigned long)
|
||||
#define IOCTL_DISABLE_WDOG_TIMER _IO('s', 0xAD)
|
||||
#define IOCTL_UNMASK_WDOG_WAKEUP_EVENT _IO('s',0xAE)
|
||||
#define IOCTL_PROGRAM_WDOG_TIMER _IOW('s',0xAF,unsigned long)
|
||||
#define IOCTL_CLEAR_WDOG_WAKEUP_EVENT _IO('s',0xB0)
|
||||
#define IOCTL_SLEEP_DEEPER_MODE _IO('s',0xB1)
|
||||
|
||||
#define DPMC_MINOR 254
|
||||
|
||||
#define ON 0
|
||||
#define OFF 1
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
unsigned long calc_volt(void);
|
||||
int calc_vlev(int vlt);
|
||||
unsigned long change_voltage(unsigned long volt);
|
||||
int calc_msel(int vco_hz);
|
||||
unsigned long change_frequency(unsigned long vco_mhz);
|
||||
int set_pll_div(unsigned short sel, unsigned char flag);
|
||||
int get_vco(void);
|
||||
unsigned long change_system_clock(unsigned long clock);
|
||||
unsigned long change_core_clock(unsigned long clock);
|
||||
unsigned long get_pll_status(void);
|
||||
void change_baud(int baud);
|
||||
void fullon_mode(void);
|
||||
void active_mode(void);
|
||||
void sleep_mode(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
|
||||
void deep_sleep(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
|
||||
void hibernate_mode(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
|
||||
void sleep_deeper(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
|
||||
void program_wdog_timer(unsigned long);
|
||||
void unmask_wdog_wakeup_evt(void);
|
||||
void clear_wdog_wakeup_evt(void);
|
||||
void disable_wdog_timer(void);
|
||||
void do_hibernate(int wakeup);
|
||||
void set_dram_srfs(void);
|
||||
void unset_dram_srfs(void);
|
||||
|
||||
extern unsigned long get_cclk(void);
|
||||
extern unsigned long get_sclk(void);
|
||||
#define VRPAIR(vlev, freq) (((vlev) << 16) | ((freq) >> 16))
|
||||
|
||||
struct bfin_dpmc_platform_data {
|
||||
const unsigned int *tuple_tab;
|
||||
@@ -71,8 +26,33 @@ struct bfin_dpmc_platform_data {
|
||||
unsigned short vr_settling_time; /* in us */
|
||||
};
|
||||
|
||||
#define VRPAIR(vlev, freq) (((vlev) << 16) | ((freq) >> 16))
|
||||
#else
|
||||
|
||||
#define PM_PUSH(x) \
|
||||
R0 = [P0 + (x - SRAM_BASE_ADDRESS)];\
|
||||
[--SP] = R0;\
|
||||
|
||||
#define PM_POP(x) \
|
||||
R0 = [SP++];\
|
||||
[P0 + (x - SRAM_BASE_ADDRESS)] = R0;\
|
||||
|
||||
#define PM_SYS_PUSH(x) \
|
||||
R0 = [P0 + (x - PLL_CTL)];\
|
||||
[--SP] = R0;\
|
||||
|
||||
#define PM_SYS_POP(x) \
|
||||
R0 = [SP++];\
|
||||
[P0 + (x - PLL_CTL)] = R0;\
|
||||
|
||||
#define PM_SYS_PUSH16(x) \
|
||||
R0 = w[P0 + (x - PLL_CTL)];\
|
||||
[--SP] = R0;\
|
||||
|
||||
#define PM_SYS_POP16(x) \
|
||||
R0 = [SP++];\
|
||||
w[P0 + (x - PLL_CTL)] = R0;\
|
||||
|
||||
#endif
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /*_BLACKFIN_DPMC_H_*/
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#define EF_BFIN_FDPIC 0x00000002 /* -mfdpic */
|
||||
#define EF_BFIN_CODE_IN_L1 0x00000010 /* --code-in-l1 */
|
||||
#define EF_BFIN_DATA_IN_L1 0x00000020 /* --data-in-l1 */
|
||||
#define EF_BFIN_CODE_IN_L2 0x00000040 /* --code-in-l2 */
|
||||
#define EF_BFIN_DATA_IN_L2 0x00000080 /* --data-in-l2 */
|
||||
|
||||
typedef unsigned long elf_greg_t;
|
||||
|
||||
|
||||
@@ -376,8 +376,12 @@ struct gpio_port_t {
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
unsigned int bfin_pm_setup(void);
|
||||
void bfin_pm_restore(void);
|
||||
|
||||
unsigned int bfin_pm_standby_setup(void);
|
||||
void bfin_pm_standby_restore(void);
|
||||
|
||||
void bfin_gpio_pm_hibernate_restore(void);
|
||||
void bfin_gpio_pm_hibernate_suspend(void);
|
||||
|
||||
#ifndef CONFIG_BF54x
|
||||
#define PM_WAKE_RISING 0x1
|
||||
@@ -392,17 +396,8 @@ void gpio_pm_wakeup_free(unsigned gpio);
|
||||
|
||||
struct gpio_port_s {
|
||||
unsigned short data;
|
||||
unsigned short data_clear;
|
||||
unsigned short data_set;
|
||||
unsigned short toggle;
|
||||
unsigned short maska;
|
||||
unsigned short maska_clear;
|
||||
unsigned short maska_set;
|
||||
unsigned short maska_toggle;
|
||||
unsigned short maskb;
|
||||
unsigned short maskb_clear;
|
||||
unsigned short maskb_set;
|
||||
unsigned short maskb_toggle;
|
||||
unsigned short dir;
|
||||
unsigned short polar;
|
||||
unsigned short edge;
|
||||
@@ -411,10 +406,10 @@ struct gpio_port_s {
|
||||
|
||||
unsigned short fer;
|
||||
unsigned short reserved;
|
||||
unsigned short mux;
|
||||
};
|
||||
#endif /*CONFIG_BF54x*/
|
||||
#endif /*CONFIG_PM*/
|
||||
|
||||
/***********************************************************
|
||||
*
|
||||
* FUNCTIONS: Blackfin GPIO Driver
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
/****************************************************************************/
|
||||
|
||||
/*
|
||||
* linux/include/asm-blackfin/ide.h
|
||||
*
|
||||
* Copyright (C) 1994-1996 Linus Torvalds & authors
|
||||
* Copyright (C) 2001 Lineo Inc., davidm@snapgear.com
|
||||
* Copyright (C) 2002 Greg Ungerer (gerg@snapgear.com)
|
||||
* Copyright (C) 2002 Yoshinori Sato (ysato@users.sourceforge.jp)
|
||||
* Copyright (C) 2005 Hennerich Michael (hennerich@blackfin.uclinux.org)
|
||||
*/
|
||||
|
||||
/****************************************************************************/
|
||||
#ifndef _BLACKFIN_IDE_H
|
||||
#define _BLACKFIN_IDE_H
|
||||
/****************************************************************************/
|
||||
#ifdef __KERNEL__
|
||||
/****************************************************************************/
|
||||
|
||||
#define MAX_HWIFS 1
|
||||
|
||||
#include <asm-generic/ide_iops.h>
|
||||
|
||||
/****************************************************************************/
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _BLACKFIN_IDE_H */
|
||||
/****************************************************************************/
|
||||
@@ -1,6 +0,0 @@
|
||||
#ifndef __LINUX_KVM_BLACKFIN_H
|
||||
#define __LINUX_KVM_BLACKFIN_H
|
||||
|
||||
/* blackfin does not support KVM */
|
||||
|
||||
#endif
|
||||
@@ -23,6 +23,8 @@
|
||||
#define ANOMALY_05000245 (1)
|
||||
/* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */
|
||||
#define ANOMALY_05000265 (1)
|
||||
/* New Feature: EMAC TX DMA Word Alignment */
|
||||
#define ANOMALY_05000285 (1)
|
||||
/* Errors when SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */
|
||||
#define ANOMALY_05000312 (1)
|
||||
/* Incorrect Access of OTP_STATUS During otp_write() Function */
|
||||
|
||||
@@ -118,16 +118,25 @@ static inline void SIR_UART_CLEAR_LSR(struct bfin_sir_port *port)
|
||||
|
||||
#define DRIVER_NAME "bfin_sir"
|
||||
|
||||
static void bfin_sir_hw_init(void)
|
||||
static int bfin_sir_hw_init(void)
|
||||
{
|
||||
int ret = -ENODEV;
|
||||
#ifdef CONFIG_BFIN_SIR0
|
||||
peripheral_request(P_UART0_TX, DRIVER_NAME);
|
||||
peripheral_request(P_UART0_RX, DRIVER_NAME);
|
||||
ret = peripheral_request(P_UART0_TX, DRIVER_NAME);
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = peripheral_request(P_UART0_RX, DRIVER_NAME);
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BFIN_SIR1
|
||||
peripheral_request(P_UART1_TX, DRIVER_NAME);
|
||||
peripheral_request(P_UART1_RX, DRIVER_NAME);
|
||||
ret = peripheral_request(P_UART1_TX, DRIVER_NAME);
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = peripheral_request(P_UART1_RX, DRIVER_NAME);
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif
|
||||
SSYNC();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -302,6 +302,7 @@
|
||||
#define PHYIE 0x00000001 /* PHY_INT Interrupt Enable */
|
||||
#define RXDWA 0x00000002 /* Receive Frame DMA Word Alignment (Odd/Even*) */
|
||||
#define RXCKS 0x00000004 /* Enable RX Frame TCP/UDP Checksum Computation */
|
||||
#define TXDWA 0x00000010 /* Transmit Frame DMA Word Alignment (Odd/Even*) */
|
||||
#define MDCDIV 0x00003F00 /* SCLK:MDC Clock Divisor [MDC=SCLK/(2*(N+1))] */
|
||||
|
||||
#define SET_MDCDIV(x) (((x)&0x3F)<< 8) /* Set MDC Clock Divisor */
|
||||
|
||||
@@ -146,33 +146,6 @@
|
||||
#define SDRAM_CL CL_3
|
||||
#endif
|
||||
|
||||
#if (CONFIG_MEM_SIZE == 128)
|
||||
#define SDRAM_SIZE EBSZ_128
|
||||
#endif
|
||||
#if (CONFIG_MEM_SIZE == 64)
|
||||
#define SDRAM_SIZE EBSZ_64
|
||||
#endif
|
||||
#if (CONFIG_MEM_SIZE == 32)
|
||||
#define SDRAM_SIZE EBSZ_32
|
||||
#endif
|
||||
#if (CONFIG_MEM_SIZE == 16)
|
||||
#define SDRAM_SIZE EBSZ_16
|
||||
#endif
|
||||
#if (CONFIG_MEM_ADD_WIDTH == 11)
|
||||
#define SDRAM_WIDTH EBCAW_11
|
||||
#endif
|
||||
#if (CONFIG_MEM_ADD_WIDTH == 10)
|
||||
#define SDRAM_WIDTH EBCAW_10
|
||||
#endif
|
||||
#if (CONFIG_MEM_ADD_WIDTH == 9)
|
||||
#define SDRAM_WIDTH EBCAW_9
|
||||
#endif
|
||||
#if (CONFIG_MEM_ADD_WIDTH == 8)
|
||||
#define SDRAM_WIDTH EBCAW_8
|
||||
#endif
|
||||
|
||||
#define mem_SDBCTL (SDRAM_WIDTH | SDRAM_SIZE | EBE)
|
||||
|
||||
/* Equation from section 17 (p17-46) of BF533 HRM */
|
||||
#define mem_SDRRC (((CONFIG_SCLK_HZ / 1000) * SDRAM_Tref) / SDRAM_NRA) - (SDRAM_tRAS_num + SDRAM_tRP_num)
|
||||
|
||||
|
||||
@@ -110,11 +110,16 @@ static inline void SIR_UART_CLEAR_LSR(struct bfin_sir_port *port)
|
||||
|
||||
#define DRIVER_NAME "bfin_sir"
|
||||
|
||||
static void bfin_sir_hw_init(void)
|
||||
static int bfin_sir_hw_init(void)
|
||||
{
|
||||
int ret = -ENODEV;
|
||||
#ifdef CONFIG_BFIN_SIR0
|
||||
peripheral_request(P_UART0_TX, DRIVER_NAME);
|
||||
peripheral_request(P_UART0_RX, DRIVER_NAME);
|
||||
ret = peripheral_request(P_UART0_TX, DRIVER_NAME);
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = peripheral_request(P_UART0_RX, DRIVER_NAME);
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif
|
||||
SSYNC();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -133,33 +133,6 @@
|
||||
#define SDRAM_CL CL_3
|
||||
#endif
|
||||
|
||||
#if (CONFIG_MEM_SIZE == 128)
|
||||
#define SDRAM_SIZE EBSZ_128
|
||||
#endif
|
||||
#if (CONFIG_MEM_SIZE == 64)
|
||||
#define SDRAM_SIZE EBSZ_64
|
||||
#endif
|
||||
#if (CONFIG_MEM_SIZE == 32)
|
||||
#define SDRAM_SIZE EBSZ_32
|
||||
#endif
|
||||
#if (CONFIG_MEM_SIZE == 16)
|
||||
#define SDRAM_SIZE EBSZ_16
|
||||
#endif
|
||||
#if (CONFIG_MEM_ADD_WIDTH == 11)
|
||||
#define SDRAM_WIDTH EBCAW_11
|
||||
#endif
|
||||
#if (CONFIG_MEM_ADD_WIDTH == 10)
|
||||
#define SDRAM_WIDTH EBCAW_10
|
||||
#endif
|
||||
#if (CONFIG_MEM_ADD_WIDTH == 9)
|
||||
#define SDRAM_WIDTH EBCAW_9
|
||||
#endif
|
||||
#if (CONFIG_MEM_ADD_WIDTH == 8)
|
||||
#define SDRAM_WIDTH EBCAW_8
|
||||
#endif
|
||||
|
||||
#define mem_SDBCTL (SDRAM_WIDTH | SDRAM_SIZE | EBE)
|
||||
|
||||
/* Equation from section 17 (p17-46) of BF533 HRM */
|
||||
#define mem_SDRRC (((CONFIG_SCLK_HZ / 1000) * SDRAM_Tref) / SDRAM_NRA) - (SDRAM_tRAS_num + SDRAM_tRP_num)
|
||||
|
||||
|
||||
@@ -118,16 +118,25 @@ static inline void SIR_UART_CLEAR_LSR(struct bfin_sir_port *port)
|
||||
|
||||
#define DRIVER_NAME "bfin_sir"
|
||||
|
||||
static void bfin_sir_hw_init(void)
|
||||
static int bfin_sir_hw_init(void)
|
||||
{
|
||||
int ret = -ENODEV;
|
||||
#ifdef CONFIG_BFIN_SIR0
|
||||
peripheral_request(P_UART0_TX, DRIVER_NAME);
|
||||
peripheral_request(P_UART0_RX, DRIVER_NAME);
|
||||
ret = peripheral_request(P_UART0_TX, DRIVER_NAME);
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = peripheral_request(P_UART0_RX, DRIVER_NAME);
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BFIN_SIR1
|
||||
peripheral_request(P_UART1_TX, DRIVER_NAME);
|
||||
peripheral_request(P_UART1_RX, DRIVER_NAME);
|
||||
ret = peripheral_request(P_UART1_TX, DRIVER_NAME);
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = peripheral_request(P_UART1_RX, DRIVER_NAME);
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif
|
||||
SSYNC();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -290,6 +290,7 @@
|
||||
#define PHYIE 0x00000001 /* PHY_INT Interrupt Enable */
|
||||
#define RXDWA 0x00000002 /* Receive Frame DMA Word Alignment (Odd/Even*) */
|
||||
#define RXCKS 0x00000004 /* Enable RX Frame TCP/UDP Checksum Computation */
|
||||
#define TXDWA 0x00000010 /* Transmit Frame DMA Word Alignment (Odd/Even*) */
|
||||
#define MDCDIV 0x00003F00 /* SCLK:MDC Clock Divisor [MDC=SCLK/(2*(N+1))] */
|
||||
|
||||
#define SET_MDCDIV(x) (((x)&0x3F)<< 8) /* Set MDC Clock Divisor */
|
||||
|
||||
@@ -139,33 +139,6 @@
|
||||
#define SDRAM_CL CL_3
|
||||
#endif
|
||||
|
||||
#if (CONFIG_MEM_SIZE == 128)
|
||||
#define SDRAM_SIZE EBSZ_128
|
||||
#endif
|
||||
#if (CONFIG_MEM_SIZE == 64)
|
||||
#define SDRAM_SIZE EBSZ_64
|
||||
#endif
|
||||
#if (CONFIG_MEM_SIZE == 32)
|
||||
#define SDRAM_SIZE EBSZ_32
|
||||
#endif
|
||||
#if (CONFIG_MEM_SIZE == 16)
|
||||
#define SDRAM_SIZE EBSZ_16
|
||||
#endif
|
||||
#if (CONFIG_MEM_ADD_WIDTH == 11)
|
||||
#define SDRAM_WIDTH EBCAW_11
|
||||
#endif
|
||||
#if (CONFIG_MEM_ADD_WIDTH == 10)
|
||||
#define SDRAM_WIDTH EBCAW_10
|
||||
#endif
|
||||
#if (CONFIG_MEM_ADD_WIDTH == 9)
|
||||
#define SDRAM_WIDTH EBCAW_9
|
||||
#endif
|
||||
#if (CONFIG_MEM_ADD_WIDTH == 8)
|
||||
#define SDRAM_WIDTH EBCAW_8
|
||||
#endif
|
||||
|
||||
#define mem_SDBCTL (SDRAM_WIDTH | SDRAM_SIZE | EBE)
|
||||
|
||||
/* Equation from section 17 (p17-46) of BF533 HRM */
|
||||
#define mem_SDRRC (((CONFIG_SCLK_HZ / 1000) * SDRAM_Tref) / SDRAM_NRA) - (SDRAM_tRAS_num + SDRAM_tRP_num)
|
||||
|
||||
|
||||
@@ -124,26 +124,43 @@ struct bfin_sir_self {
|
||||
|
||||
#define DRIVER_NAME "bfin_sir"
|
||||
|
||||
static void bfin_sir_hw_init(void)
|
||||
static int bfin_sir_hw_init(void)
|
||||
{
|
||||
int ret = -ENODEV;
|
||||
#ifdef CONFIG_BFIN_SIR0
|
||||
peripheral_request(P_UART0_TX, DRIVER_NAME);
|
||||
peripheral_request(P_UART0_RX, DRIVER_NAME);
|
||||
ret = peripheral_request(P_UART0_TX, DRIVER_NAME);
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = peripheral_request(P_UART0_RX, DRIVER_NAME);
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BFIN_SIR1
|
||||
peripheral_request(P_UART1_TX, DRIVER_NAME);
|
||||
peripheral_request(P_UART1_RX, DRIVER_NAME);
|
||||
ret = peripheral_request(P_UART1_TX, DRIVER_NAME);
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = peripheral_request(P_UART1_RX, DRIVER_NAME);
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BFIN_SIR2
|
||||
peripheral_request(P_UART2_TX, DRIVER_NAME);
|
||||
peripheral_request(P_UART2_RX, DRIVER_NAME);
|
||||
ret = peripheral_request(P_UART2_TX, DRIVER_NAME);
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = peripheral_request(P_UART2_RX, DRIVER_NAME);
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BFIN_SIR3
|
||||
peripheral_request(P_UART3_TX, DRIVER_NAME);
|
||||
peripheral_request(P_UART3_RX, DRIVER_NAME);
|
||||
ret = peripheral_request(P_UART3_TX, DRIVER_NAME);
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = peripheral_request(P_UART3_RX, DRIVER_NAME);
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif
|
||||
SSYNC();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -209,3 +209,11 @@ struct gpio_port_t {
|
||||
unsigned short dummy7;
|
||||
unsigned int port_mux;
|
||||
};
|
||||
|
||||
struct gpio_port_s {
|
||||
unsigned short fer;
|
||||
unsigned short data;
|
||||
unsigned short dir;
|
||||
unsigned short inen;
|
||||
unsigned int mux;
|
||||
};
|
||||
|
||||
@@ -110,11 +110,16 @@ static inline void SIR_UART_CLEAR_LSR(struct bfin_sir_port *port)
|
||||
|
||||
#define DRIVER_NAME "bfin_sir"
|
||||
|
||||
static void bfin_sir_hw_init(void)
|
||||
static int bfin_sir_hw_init(void)
|
||||
{
|
||||
int ret = -ENODEV;
|
||||
#ifdef CONFIG_BFIN_SIR0
|
||||
peripheral_request(P_UART0_TX, DRIVER_NAME);
|
||||
peripheral_request(P_UART0_RX, DRIVER_NAME);
|
||||
ret = peripheral_request(P_UART0_TX, DRIVER_NAME);
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = peripheral_request(P_UART0_RX, DRIVER_NAME);
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif
|
||||
SSYNC();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -131,33 +131,6 @@
|
||||
#define SDRAM_CL CL_3
|
||||
#endif
|
||||
|
||||
#if (CONFIG_MEM_SIZE == 128)
|
||||
#define SDRAM_SIZE EB0_SZ_128
|
||||
#endif
|
||||
#if (CONFIG_MEM_SIZE == 64)
|
||||
#define SDRAM_SIZE EB0_SZ_64
|
||||
#endif
|
||||
#if ( CONFIG_MEM_SIZE == 32)
|
||||
#define SDRAM_SIZE EB0_SZ_32
|
||||
#endif
|
||||
#if (CONFIG_MEM_SIZE == 16)
|
||||
#define SDRAM_SIZE EB0_SZ_16
|
||||
#endif
|
||||
#if (CONFIG_MEM_ADD_WIDTH == 11)
|
||||
#define SDRAM_WIDTH EB0_CAW_11
|
||||
#endif
|
||||
#if (CONFIG_MEM_ADD_WIDTH == 10)
|
||||
#define SDRAM_WIDTH EB0_CAW_10
|
||||
#endif
|
||||
#if (CONFIG_MEM_ADD_WIDTH == 9)
|
||||
#define SDRAM_WIDTH EB0_CAW_9
|
||||
#endif
|
||||
#if (CONFIG_MEM_ADD_WIDTH == 8)
|
||||
#define SDRAM_WIDTH EB0_CAW_8
|
||||
#endif
|
||||
|
||||
#define mem_SDBCTL (SDRAM_WIDTH | SDRAM_SIZE | EB0_E)
|
||||
|
||||
/* Equation from section 17 (p17-46) of BF533 HRM */
|
||||
#define mem_SDRRC (((CONFIG_SCLK_HZ / 1000) * SDRAM_Tref) / SDRAM_NRA) - (SDRAM_tRAS_num + SDRAM_tRP_num)
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
#define Elf_Shdr Elf32_Shdr
|
||||
#define Elf_Sym Elf32_Sym
|
||||
#define Elf_Ehdr Elf32_Ehdr
|
||||
#define FLG_CODE_IN_L1 0x10
|
||||
#define FLG_DATA_IN_L1 0x20
|
||||
|
||||
struct mod_arch_specific {
|
||||
Elf_Shdr *text_l1;
|
||||
@@ -15,5 +13,8 @@ struct mod_arch_specific {
|
||||
Elf_Shdr *bss_a_l1;
|
||||
Elf_Shdr *data_b_l1;
|
||||
Elf_Shdr *bss_b_l1;
|
||||
Elf_Shdr *text_l2;
|
||||
Elf_Shdr *data_l2;
|
||||
Elf_Shdr *bss_l2;
|
||||
};
|
||||
#endif /* _ASM_BFIN_MODULE_H */
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
/*
|
||||
* linux/include/asm/namei.h
|
||||
*
|
||||
* Included from linux/fs/namei.c
|
||||
*
|
||||
* Changes made by Lineo Inc. May 2001
|
||||
*/
|
||||
|
||||
#ifndef __BFIN_NAMEI_H
|
||||
#define __BFIN_NAMEI_H
|
||||
|
||||
/* This dummy routine maybe changed to something useful
|
||||
* for /usr/gnemul/ emulation stuff.
|
||||
* Look at asm-sparc/namei.h for details.
|
||||
*/
|
||||
|
||||
#define __emul_prefix() NULL
|
||||
|
||||
#endif
|
||||
@@ -51,9 +51,6 @@ typedef struct page *pgtable_t;
|
||||
#define __pgd(x) ((pgd_t) { (x) } )
|
||||
#define __pgprot(x) ((pgprot_t) { (x) } )
|
||||
|
||||
/* to align the pointer to the (next) page boundary */
|
||||
#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
|
||||
|
||||
extern unsigned long memory_start;
|
||||
extern unsigned long memory_end;
|
||||
|
||||
|
||||
@@ -112,7 +112,26 @@ unsigned long get_wchan(struct task_struct *p);
|
||||
static inline uint32_t __pure bfin_revid(void)
|
||||
{
|
||||
/* stored in the upper 4 bits */
|
||||
return bfin_read_CHIPID() >> 28;
|
||||
uint32_t revid = bfin_read_CHIPID() >> 28;
|
||||
|
||||
#ifdef CONFIG_BF52x
|
||||
/* ANOMALY_05000357
|
||||
* Incorrect Revision Number in DSPID Register
|
||||
*/
|
||||
if (revid == 0)
|
||||
switch (bfin_read16(_BOOTROM_GET_DXE_ADDRESS_TWI)) {
|
||||
case 0x0010:
|
||||
revid = 0;
|
||||
break;
|
||||
case 0x2796:
|
||||
revid = 1;
|
||||
break;
|
||||
default:
|
||||
revid = 0xFFFF;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
return revid;
|
||||
}
|
||||
|
||||
static inline uint32_t __pure bfin_compiled_revid(void)
|
||||
|
||||
@@ -83,14 +83,14 @@ struct pt_regs {
|
||||
#define PTRACE_GETREGS 12
|
||||
#define PTRACE_SETREGS 13 /* ptrace signal */
|
||||
|
||||
#ifdef CONFIG_BINFMT_ELF_FDPIC
|
||||
#define PTRACE_GETFDPIC 31
|
||||
#define PTRACE_GETFDPIC_EXEC 0
|
||||
#define PTRACE_GETFDPIC_INTERP 1
|
||||
#endif
|
||||
|
||||
#define PS_S (0x0002)
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* user_mode returns true if only one bit is set in IPEND, other than the
|
||||
master interrupt enable. */
|
||||
#define user_mode(regs) (!(((regs)->ipend & ~0x10) & (((regs)->ipend & ~0x10) - 1)))
|
||||
@@ -98,6 +98,8 @@ struct pt_regs {
|
||||
#define profile_pc(regs) instruction_pointer(regs)
|
||||
extern void show_regs(struct pt_regs *);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
/*
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#include <linux/semaphore.h>
|
||||
@@ -42,6 +42,7 @@
|
||||
/*
|
||||
* Size of kernel stack for each process. This must be a power of 2...
|
||||
*/
|
||||
#define THREAD_SIZE_ORDER 1
|
||||
#define THREAD_SIZE 8192 /* 2 pages */
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
@@ -94,10 +95,6 @@ static inline struct thread_info *current_thread_info(void)
|
||||
return (struct thread_info *)((long)ti & ~((long)THREAD_SIZE-1));
|
||||
}
|
||||
|
||||
/* thread information allocation */
|
||||
#define alloc_thread_info(tsk) ((struct thread_info *) \
|
||||
__get_free_pages(GFP_KERNEL, 1))
|
||||
#define free_thread_info(ti) free_pages((unsigned long) (ti), 1)
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
header-y += ptrace.h
|
||||
header-y += user.h
|
||||
header-y += svinto.h
|
||||
header-y += sv_addr_ag.h
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
/*
|
||||
* linux/include/asm-cris/ide.h
|
||||
*
|
||||
* Copyright (C) 2000, 2001, 2002 Axis Communications AB
|
||||
*
|
||||
* Authors: Bjorn Wesen
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file contains the ETRAX 100LX specific IDE code.
|
||||
*/
|
||||
|
||||
#ifndef __ASMCRIS_IDE_H
|
||||
#define __ASMCRIS_IDE_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <asm/arch/svinto.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm-generic/ide_iops.h>
|
||||
|
||||
|
||||
/* ETRAX 100 can support 4 IDE busses on the same pins (serialized) */
|
||||
|
||||
#define MAX_HWIFS 4
|
||||
|
||||
static inline int ide_default_irq(unsigned long base)
|
||||
{
|
||||
/* all IDE busses share the same IRQ, number 4.
|
||||
* this has the side-effect that ide-probe.c will cluster our 4 interfaces
|
||||
* together in a hwgroup, and will serialize accesses. this is good, because
|
||||
* we can't access more than one interface at the same time on ETRAX100.
|
||||
*/
|
||||
return 4;
|
||||
}
|
||||
|
||||
static inline unsigned long ide_default_io_base(int index)
|
||||
{
|
||||
/* we have no real I/O base address per interface, since all go through the
|
||||
* same register. but in a bitfield in that register, we have the i/f number.
|
||||
* so we can use the io_base to remember that bitfield.
|
||||
*/
|
||||
static const unsigned long io_bases[MAX_HWIFS] = {
|
||||
IO_FIELD(R_ATA_CTRL_DATA, sel, 0),
|
||||
IO_FIELD(R_ATA_CTRL_DATA, sel, 1),
|
||||
IO_FIELD(R_ATA_CTRL_DATA, sel, 2),
|
||||
IO_FIELD(R_ATA_CTRL_DATA, sel, 3)
|
||||
};
|
||||
return io_bases[index];
|
||||
}
|
||||
|
||||
/* this is called once for each interface, to setup the port addresses. data_port is the result
|
||||
* of the ide_default_io_base call above. ctrl_port will be 0, but that is don't care for us.
|
||||
*/
|
||||
|
||||
static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port, unsigned long ctrl_port, int *irq)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* fill in ports for ATA addresses 0 to 7 */
|
||||
for (i = 0; i <= 7; i++) {
|
||||
hw->io_ports_array[i] = data_port |
|
||||
IO_FIELD(R_ATA_CTRL_DATA, addr, i) |
|
||||
IO_STATE(R_ATA_CTRL_DATA, cs0, active);
|
||||
}
|
||||
|
||||
/* the IDE control register is at ATA address 6, with CS1 active instead of CS0 */
|
||||
hw->io_ports.ctl_addr = data_port |
|
||||
IO_FIELD(R_ATA_CTRL_DATA, addr, 6) |
|
||||
IO_STATE(R_ATA_CTRL_DATA, cs1, active);
|
||||
|
||||
/* whats this for ? */
|
||||
hw->io_ports.irq_addr = 0;
|
||||
}
|
||||
|
||||
static inline void ide_init_default_hwifs(void)
|
||||
{
|
||||
hw_regs_t hw;
|
||||
int index;
|
||||
|
||||
for(index = 0; index < MAX_HWIFS; index++) {
|
||||
ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL);
|
||||
hw.irq = ide_default_irq(ide_default_io_base(index));
|
||||
ide_register_hw(&hw, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* __ASMCRIS_IDE_H */
|
||||
@@ -106,10 +106,14 @@ struct switch_stack {
|
||||
unsigned long return_ip; /* ip that _resume will return to */
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* bit 8 is user-mode flag */
|
||||
#define user_mode(regs) (((regs)->dccr & 0x100) != 0)
|
||||
#define instruction_pointer(regs) ((regs)->irp)
|
||||
#define profile_pc(regs) instruction_pointer(regs)
|
||||
extern void show_regs(struct pt_regs *);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
header-y += ptrace.h
|
||||
header-y += user.h
|
||||
header-y += cryptocop.h
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* linux/include/asm-cris/ide.h
|
||||
*
|
||||
* Copyright (C) 2000-2004 Axis Communications AB
|
||||
*
|
||||
* Authors: Bjorn Wesen, Mikael Starvik
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file contains the ETRAX FS specific IDE code.
|
||||
*/
|
||||
|
||||
#ifndef __ASMCRIS_IDE_H
|
||||
#define __ASMCRIS_IDE_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <asm/arch/hwregs/intr_vect.h>
|
||||
#include <asm/arch/hwregs/ata_defs.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm-generic/ide_iops.h>
|
||||
|
||||
|
||||
/* ETRAX FS can support 4 IDE busses on the same pins (serialized) */
|
||||
|
||||
#define MAX_HWIFS 4
|
||||
|
||||
static inline int ide_default_irq(unsigned long base)
|
||||
{
|
||||
/* all IDE busses share the same IRQ,
|
||||
* this has the side-effect that ide-probe.c will cluster our 4 interfaces
|
||||
* together in a hwgroup, and will serialize accesses. this is good, because
|
||||
* we can't access more than one interface at the same time on ETRAX100.
|
||||
*/
|
||||
return ATA_INTR_VECT;
|
||||
}
|
||||
|
||||
static inline unsigned long ide_default_io_base(int index)
|
||||
{
|
||||
reg_ata_rw_ctrl2 ctrl2 = {.sel = index};
|
||||
/* we have no real I/O base address per interface, since all go through the
|
||||
* same register. but in a bitfield in that register, we have the i/f number.
|
||||
* so we can use the io_base to remember that bitfield.
|
||||
*/
|
||||
ctrl2.sel = index;
|
||||
|
||||
return REG_TYPE_CONV(unsigned long, reg_ata_rw_ctrl2, ctrl2);
|
||||
}
|
||||
|
||||
#define IDE_ARCH_ACK_INTR
|
||||
#define ide_ack_intr(hwif) ((hwif)->ack_intr(hwif))
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* __ASMCRIS_IDE_H */
|
||||
@@ -106,9 +106,13 @@ struct switch_stack {
|
||||
unsigned long return_ip; /* ip that _resume will return to */
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#define user_mode(regs) (((regs)->ccs & (1 << (U_CCS_BITNR + CCS_SHIFT))) != 0)
|
||||
#define instruction_pointer(regs) ((regs)->erp)
|
||||
extern void show_regs(struct pt_regs *);
|
||||
#define profile_pc(regs) instruction_pointer(regs)
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
|
||||
memcpy(dst, src, len)
|
||||
|
||||
void global_flush_tlb(void);
|
||||
int change_page_attr(struct page *page, int numpages, pgprot_t prot);
|
||||
|
||||
#endif /* _CRIS_CACHEFLUSH_H */
|
||||
|
||||
@@ -120,7 +120,7 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
|
||||
}
|
||||
|
||||
static inline int
|
||||
dma_mapping_error(dma_addr_t dma_addr)
|
||||
dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#include <asm/arch/ide.h>
|
||||
@@ -1,6 +0,0 @@
|
||||
#ifndef __LINUX_KVM_CRIS_H
|
||||
#define __LINUX_KVM_CRIS_H
|
||||
|
||||
/* cris does not support KVM */
|
||||
|
||||
#endif
|
||||
@@ -1,17 +0,0 @@
|
||||
/* $Id: namei.h,v 1.1 2000/07/10 16:32:31 bjornw Exp $
|
||||
* linux/include/asm-cris/namei.h
|
||||
*
|
||||
* Included from linux/fs/namei.c
|
||||
*/
|
||||
|
||||
#ifndef __CRIS_NAMEI_H
|
||||
#define __CRIS_NAMEI_H
|
||||
|
||||
/* used to find file-system prefixes for doing emulations
|
||||
* see for example asm-sparc/namei.h
|
||||
* we don't use it...
|
||||
*/
|
||||
|
||||
#define __emul_prefix() NULL
|
||||
|
||||
#endif /* __CRIS_NAMEI_H */
|
||||
@@ -60,9 +60,6 @@ typedef struct page *pgtable_t;
|
||||
|
||||
#define page_to_phys(page) __pa((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET)
|
||||
|
||||
/* to align the pointer to the (next) page boundary */
|
||||
#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
@@ -4,11 +4,13 @@
|
||||
#include <asm/arch/ptrace.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
|
||||
#define PTRACE_GETREGS 12
|
||||
#define PTRACE_SETREGS 13
|
||||
#endif
|
||||
|
||||
#define profile_pc(regs) instruction_pointer(regs)
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _CRIS_PTRACE_H */
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#include <linux/semaphore.h>
|
||||
@@ -11,6 +11,8 @@
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#include <asm/types.h>
|
||||
#include <asm/processor.h>
|
||||
|
||||
@@ -3,4 +3,3 @@ include include/asm-generic/Kbuild.asm
|
||||
header-y += registers.h
|
||||
|
||||
unifdef-y += termios.h
|
||||
unifdef-y += ptrace.h
|
||||
|
||||
@@ -126,7 +126,7 @@ void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nele
|
||||
}
|
||||
|
||||
static inline
|
||||
int dma_mapping_error(dma_addr_t dma_addr)
|
||||
int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -18,10 +18,6 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/irq.h>
|
||||
|
||||
#ifndef MAX_HWIFS
|
||||
#define MAX_HWIFS 8
|
||||
#endif
|
||||
|
||||
/****************************************************************************/
|
||||
/*
|
||||
* some bits needed for parts of the IDE subsystem to compile
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#ifndef __LINUX_KVM_FRV_H
|
||||
#define __LINUX_KVM_FRV_H
|
||||
|
||||
/* frv does not support KVM */
|
||||
|
||||
#endif
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* include/asm-frv/namei.h
|
||||
*
|
||||
* Included from linux/fs/namei.c
|
||||
*/
|
||||
|
||||
#ifndef __ASM_NAMEI_H
|
||||
#define __ASM_NAMEI_H
|
||||
|
||||
/* This dummy routine maybe changed to something useful
|
||||
* for /usr/gnemul/ emulation stuff.
|
||||
* Look at asm-sparc/namei.h for details.
|
||||
*/
|
||||
|
||||
#define __emul_prefix() NULL
|
||||
|
||||
#endif
|
||||
|
||||
@@ -40,9 +40,6 @@ typedef struct page *pgtable_t;
|
||||
#define __pgprot(x) ((pgprot_t) { (x) } )
|
||||
#define PTE_MASK PAGE_MASK
|
||||
|
||||
/* to align the pointer to the (next) page boundary */
|
||||
#define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK)
|
||||
|
||||
#define devmem_is_allowed(pfn) 1
|
||||
|
||||
#define __pa(vaddr) virt_to_phys((void *) (unsigned long) (vaddr))
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#include <linux/semaphore.h>
|
||||
@@ -82,6 +82,8 @@ register struct thread_info *__current_thread_info asm("gr15");
|
||||
|
||||
#define current_thread_info() ({ __current_thread_info; })
|
||||
|
||||
#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR
|
||||
|
||||
/* thread information allocation */
|
||||
#ifdef CONFIG_DEBUG_STACK_USAGE
|
||||
#define alloc_thread_info(tsk) \
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
ifneq ($(wildcard $(srctree)/include/asm-$(SRCARCH)/kvm.h),)
|
||||
header-y += kvm.h
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard $(srctree)/include/asm-$(SRCARCH)/a.out.h),)
|
||||
unifdef-y += a.out.h
|
||||
|
||||
@@ -34,9 +34,14 @@ struct bug_entry {
|
||||
#ifndef __WARN
|
||||
#ifndef __ASSEMBLY__
|
||||
extern void warn_on_slowpath(const char *file, const int line);
|
||||
extern void warn_slowpath(const char *file, const int line,
|
||||
const char *fmt, ...) __attribute__((format(printf, 3, 4)));
|
||||
#define WANT_WARN_ON_SLOWPATH
|
||||
#endif
|
||||
#define __WARN() warn_on_slowpath(__FILE__, __LINE__)
|
||||
#define __WARN_printf(arg...) warn_slowpath(__FILE__, __LINE__, arg)
|
||||
#else
|
||||
#define __WARN_printf(arg...) __WARN()
|
||||
#endif
|
||||
|
||||
#ifndef WARN_ON
|
||||
@@ -48,6 +53,15 @@ extern void warn_on_slowpath(const char *file, const int line);
|
||||
})
|
||||
#endif
|
||||
|
||||
#ifndef WARN
|
||||
#define WARN(condition, format...) ({ \
|
||||
int __ret_warn_on = !!(condition); \
|
||||
if (unlikely(__ret_warn_on)) \
|
||||
__WARN_printf(format); \
|
||||
unlikely(__ret_warn_on); \
|
||||
})
|
||||
#endif
|
||||
|
||||
#else /* !CONFIG_BUG */
|
||||
#ifndef HAVE_ARCH_BUG
|
||||
#define BUG()
|
||||
@@ -63,6 +77,14 @@ extern void warn_on_slowpath(const char *file, const int line);
|
||||
unlikely(__ret_warn_on); \
|
||||
})
|
||||
#endif
|
||||
|
||||
#ifndef WARN
|
||||
#define WARN(condition, format...) ({ \
|
||||
int __ret_warn_on = !!(condition); \
|
||||
unlikely(__ret_warn_on); \
|
||||
})
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#define WARN_ON_ONCE(condition) ({ \
|
||||
@@ -75,6 +97,9 @@ extern void warn_on_slowpath(const char *file, const int line);
|
||||
unlikely(__ret_warn_once); \
|
||||
})
|
||||
|
||||
#define WARN_ON_RATELIMIT(condition, state) \
|
||||
WARN_ON((condition) && __ratelimit(state))
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
# define WARN_ON_SMP(x) WARN_ON(x)
|
||||
#else
|
||||
|
||||
@@ -61,7 +61,7 @@ dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
|
||||
#define dma_sync_sg_for_device dma_sync_sg_for_cpu
|
||||
|
||||
extern int
|
||||
dma_mapping_error(dma_addr_t dma_addr);
|
||||
dma_mapping_error(struct device *dev, dma_addr_t dma_addr);
|
||||
|
||||
extern int
|
||||
dma_supported(struct device *dev, u64 mask);
|
||||
|
||||
@@ -144,9 +144,9 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
|
||||
}
|
||||
|
||||
static inline int
|
||||
dma_mapping_error(dma_addr_t dma_addr)
|
||||
dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
|
||||
{
|
||||
return pci_dma_mapping_error(dma_addr);
|
||||
return pci_dma_mapping_error(to_pci_dev(dev), dma_addr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#ifdef CONFIG_HAVE_GPIO_LIB
|
||||
#ifdef CONFIG_GPIOLIB
|
||||
|
||||
#include <linux/compiler.h>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
*
|
||||
* While the GPIO programming interface defines valid GPIO numbers
|
||||
* to be in the range 0..MAX_INT, this library restricts them to the
|
||||
* smaller range 0..ARCH_NR_GPIOS.
|
||||
* smaller range 0..ARCH_NR_GPIOS-1.
|
||||
*/
|
||||
|
||||
#ifndef ARCH_NR_GPIOS
|
||||
@@ -32,6 +32,8 @@ struct module;
|
||||
/**
|
||||
* struct gpio_chip - abstract a GPIO controller
|
||||
* @label: for diagnostics
|
||||
* @dev: optional device providing the GPIOs
|
||||
* @owner: helps prevent removal of modules exporting active GPIOs
|
||||
* @direction_input: configures signal "offset" as input, or returns error
|
||||
* @get: returns value for signal "offset"; for output signals this
|
||||
* returns either the value actually sensed, or zero
|
||||
@@ -59,6 +61,7 @@ struct module;
|
||||
*/
|
||||
struct gpio_chip {
|
||||
char *label;
|
||||
struct device *dev;
|
||||
struct module *owner;
|
||||
|
||||
int (*direction_input)(struct gpio_chip *chip,
|
||||
@@ -74,6 +77,7 @@ struct gpio_chip {
|
||||
int base;
|
||||
u16 ngpio;
|
||||
unsigned can_sleep:1;
|
||||
unsigned exported:1;
|
||||
};
|
||||
|
||||
extern const char *gpiochip_is_requested(struct gpio_chip *chip,
|
||||
@@ -108,7 +112,18 @@ extern void __gpio_set_value(unsigned gpio, int value);
|
||||
extern int __gpio_cansleep(unsigned gpio);
|
||||
|
||||
|
||||
#else
|
||||
#ifdef CONFIG_GPIO_SYSFS
|
||||
|
||||
/*
|
||||
* A sysfs interface can be exported by individual drivers if they want,
|
||||
* but more typically is configured entirely from userspace.
|
||||
*/
|
||||
extern int gpio_export(unsigned gpio, bool direction_may_change);
|
||||
extern void gpio_unexport(unsigned gpio);
|
||||
|
||||
#endif /* CONFIG_GPIO_SYSFS */
|
||||
|
||||
#else /* !CONFIG_HAVE_GPIO_LIB */
|
||||
|
||||
static inline int gpio_is_valid(int number)
|
||||
{
|
||||
@@ -137,6 +152,20 @@ static inline void gpio_set_value_cansleep(unsigned gpio, int value)
|
||||
gpio_set_value(gpio, value);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* !CONFIG_HAVE_GPIO_LIB */
|
||||
|
||||
#ifndef CONFIG_GPIO_SYSFS
|
||||
|
||||
/* sysfs support is only available with gpiolib, where it's optional */
|
||||
|
||||
static inline int gpio_export(unsigned gpio, bool direction_may_change)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline void gpio_unexport(unsigned gpio)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_GPIO_SYSFS */
|
||||
|
||||
#endif /* _ASM_GENERIC_GPIO_H */
|
||||
|
||||
@@ -26,7 +26,7 @@ typedef unsigned int __u32;
|
||||
#ifdef __GNUC__
|
||||
__extension__ typedef __signed__ long long __s64;
|
||||
__extension__ typedef unsigned long long __u64;
|
||||
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#else
|
||||
typedef __signed__ long long __s64;
|
||||
typedef unsigned long long __u64;
|
||||
#endif
|
||||
|
||||
@@ -99,9 +99,9 @@ pci_dma_sync_sg_for_device(struct pci_dev *hwdev, struct scatterlist *sg,
|
||||
}
|
||||
|
||||
static inline int
|
||||
pci_dma_mapping_error(dma_addr_t dma_addr)
|
||||
pci_dma_mapping_error(struct pci_dev *pdev, dma_addr_t dma_addr)
|
||||
{
|
||||
return dma_mapping_error(dma_addr);
|
||||
return dma_mapping_error(&pdev->dev, dma_addr);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
141
include/asm-generic/syscall.h
Normal file
141
include/asm-generic/syscall.h
Normal file
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* Access to user system call parameters and results
|
||||
*
|
||||
* Copyright (C) 2008 Red Hat, Inc. All rights reserved.
|
||||
*
|
||||
* This copyrighted material is made available to anyone wishing to use,
|
||||
* modify, copy, or redistribute it subject to the terms and conditions
|
||||
* of the GNU General Public License v.2.
|
||||
*
|
||||
* This file is a stub providing documentation for what functions
|
||||
* asm-ARCH/syscall.h files need to define. Most arch definitions
|
||||
* will be simple inlines.
|
||||
*
|
||||
* All of these functions expect to be called with no locks,
|
||||
* and only when the caller is sure that the task of interest
|
||||
* cannot return to user mode while we are looking at it.
|
||||
*/
|
||||
|
||||
#ifndef _ASM_SYSCALL_H
|
||||
#define _ASM_SYSCALL_H 1
|
||||
|
||||
struct task_struct;
|
||||
struct pt_regs;
|
||||
|
||||
/**
|
||||
* syscall_get_nr - find what system call a task is executing
|
||||
* @task: task of interest, must be blocked
|
||||
* @regs: task_pt_regs() of @task
|
||||
*
|
||||
* If @task is executing a system call or is at system call
|
||||
* tracing about to attempt one, returns the system call number.
|
||||
* If @task is not executing a system call, i.e. it's blocked
|
||||
* inside the kernel for a fault or signal, returns -1.
|
||||
*
|
||||
* It's only valid to call this when @task is known to be blocked.
|
||||
*/
|
||||
long syscall_get_nr(struct task_struct *task, struct pt_regs *regs);
|
||||
|
||||
/**
|
||||
* syscall_rollback - roll back registers after an aborted system call
|
||||
* @task: task of interest, must be in system call exit tracing
|
||||
* @regs: task_pt_regs() of @task
|
||||
*
|
||||
* It's only valid to call this when @task is stopped for system
|
||||
* call exit tracing (due to TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT),
|
||||
* after tracehook_report_syscall_entry() returned nonzero to prevent
|
||||
* the system call from taking place.
|
||||
*
|
||||
* This rolls back the register state in @regs so it's as if the
|
||||
* system call instruction was a no-op. The registers containing
|
||||
* the system call number and arguments are as they were before the
|
||||
* system call instruction. This may not be the same as what the
|
||||
* register state looked like at system call entry tracing.
|
||||
*/
|
||||
void syscall_rollback(struct task_struct *task, struct pt_regs *regs);
|
||||
|
||||
/**
|
||||
* syscall_get_error - check result of traced system call
|
||||
* @task: task of interest, must be blocked
|
||||
* @regs: task_pt_regs() of @task
|
||||
*
|
||||
* Returns 0 if the system call succeeded, or -ERRORCODE if it failed.
|
||||
*
|
||||
* It's only valid to call this when @task is stopped for tracing on exit
|
||||
* from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT.
|
||||
*/
|
||||
long syscall_get_error(struct task_struct *task, struct pt_regs *regs);
|
||||
|
||||
/**
|
||||
* syscall_get_return_value - get the return value of a traced system call
|
||||
* @task: task of interest, must be blocked
|
||||
* @regs: task_pt_regs() of @task
|
||||
*
|
||||
* Returns the return value of the successful system call.
|
||||
* This value is meaningless if syscall_get_error() returned nonzero.
|
||||
*
|
||||
* It's only valid to call this when @task is stopped for tracing on exit
|
||||
* from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT.
|
||||
*/
|
||||
long syscall_get_return_value(struct task_struct *task, struct pt_regs *regs);
|
||||
|
||||
/**
|
||||
* syscall_set_return_value - change the return value of a traced system call
|
||||
* @task: task of interest, must be blocked
|
||||
* @regs: task_pt_regs() of @task
|
||||
* @error: negative error code, or zero to indicate success
|
||||
* @val: user return value if @error is zero
|
||||
*
|
||||
* This changes the results of the system call that user mode will see.
|
||||
* If @error is zero, the user sees a successful system call with a
|
||||
* return value of @val. If @error is nonzero, it's a negated errno
|
||||
* code; the user sees a failed system call with this errno code.
|
||||
*
|
||||
* It's only valid to call this when @task is stopped for tracing on exit
|
||||
* from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT.
|
||||
*/
|
||||
void syscall_set_return_value(struct task_struct *task, struct pt_regs *regs,
|
||||
int error, long val);
|
||||
|
||||
/**
|
||||
* syscall_get_arguments - extract system call parameter values
|
||||
* @task: task of interest, must be blocked
|
||||
* @regs: task_pt_regs() of @task
|
||||
* @i: argument index [0,5]
|
||||
* @n: number of arguments; n+i must be [1,6].
|
||||
* @args: array filled with argument values
|
||||
*
|
||||
* Fetches @n arguments to the system call starting with the @i'th argument
|
||||
* (from 0 through 5). Argument @i is stored in @args[0], and so on.
|
||||
* An arch inline version is probably optimal when @i and @n are constants.
|
||||
*
|
||||
* It's only valid to call this when @task is stopped for tracing on
|
||||
* entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT.
|
||||
* It's invalid to call this with @i + @n > 6; we only support system calls
|
||||
* taking up to 6 arguments.
|
||||
*/
|
||||
void syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
|
||||
unsigned int i, unsigned int n, unsigned long *args);
|
||||
|
||||
/**
|
||||
* syscall_set_arguments - change system call parameter value
|
||||
* @task: task of interest, must be in system call entry tracing
|
||||
* @regs: task_pt_regs() of @task
|
||||
* @i: argument index [0,5]
|
||||
* @n: number of arguments; n+i must be [1,6].
|
||||
* @args: array of argument values to store
|
||||
*
|
||||
* Changes @n arguments to the system call starting with the @i'th argument.
|
||||
* @n'th argument to @val. Argument @i gets value @args[0], and so on.
|
||||
* An arch inline version is probably optimal when @i and @n are constants.
|
||||
*
|
||||
* It's only valid to call this when @task is stopped for tracing on
|
||||
* entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT.
|
||||
* It's invalid to call this with @i + @n > 6; we only support system calls
|
||||
* taking up to 6 arguments.
|
||||
*/
|
||||
void syscall_set_arguments(struct task_struct *task, struct pt_regs *regs,
|
||||
unsigned int i, unsigned int n,
|
||||
const unsigned long *args);
|
||||
|
||||
#endif /* _ASM_SYSCALL_H */
|
||||
@@ -359,6 +359,8 @@
|
||||
}
|
||||
|
||||
#define INITCALLS \
|
||||
*(.initcallearly.init) \
|
||||
__early_initcall_end = .; \
|
||||
*(.initcall0.init) \
|
||||
*(.initcall0s.init) \
|
||||
*(.initcall1.init) \
|
||||
|
||||
@@ -26,10 +26,10 @@ typedef unsigned long elf_fpregset_t;
|
||||
#define ELF_DATA ELFDATA2MSB
|
||||
#define ELF_ARCH EM_H8_300
|
||||
#if defined(__H8300H__)
|
||||
#define ELF_FLAGS 0x810000
|
||||
#define ELF_CORE_EFLAGS 0x810000
|
||||
#endif
|
||||
#if defined(__H8300S__)
|
||||
#define ELF_FLAGS 0x820000
|
||||
#define ELF_CORE_EFLAGS 0x820000
|
||||
#endif
|
||||
|
||||
#define ELF_PLAT_INIT(_r) _r->er1 = 0
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
/****************************************************************************/
|
||||
|
||||
/*
|
||||
* linux/include/asm-h8300/ide.h
|
||||
*
|
||||
* Copyright (C) 1994-1996 Linus Torvalds & authors
|
||||
* Copyright (C) 2001 Lineo Inc., davidm@snapgear.com
|
||||
* Copyright (C) 2002 Greg Ungerer (gerg@snapgear.com)
|
||||
* Copyright (C) 2002 Yoshinori Sato (ysato@users.sourceforge.jp)
|
||||
*/
|
||||
|
||||
/****************************************************************************/
|
||||
#ifndef _H8300_IDE_H
|
||||
#define _H8300_IDE_H
|
||||
/****************************************************************************/
|
||||
#ifdef __KERNEL__
|
||||
/****************************************************************************/
|
||||
|
||||
#define MAX_HWIFS 1
|
||||
|
||||
#include <asm-generic/ide_iops.h>
|
||||
|
||||
/****************************************************************************/
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _H8300_IDE_H */
|
||||
/****************************************************************************/
|
||||
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* linux/include/asm-h8300/keyboard.h
|
||||
* Created 04 Dec 2001 by Khaled Hassounah <khassounah@mediumware.net>
|
||||
* This file contains the Dragonball architecture specific keyboard definitions
|
||||
*/
|
||||
|
||||
#ifndef _H8300_KEYBOARD_H
|
||||
#define _H8300_KEYBOARD_H
|
||||
|
||||
|
||||
/* dummy i.e. no real keyboard */
|
||||
#define kbd_setkeycode(x...) (-ENOSYS)
|
||||
#define kbd_getkeycode(x...) (-ENOSYS)
|
||||
#define kbd_translate(x...) (0)
|
||||
#define kbd_unexpected_up(x...) (1)
|
||||
#define kbd_leds(x...) do {;} while (0)
|
||||
#define kbd_init_hw(x...) do {;} while (0)
|
||||
#define kbd_enable_irq(x...) do {;} while (0)
|
||||
#define kbd_disable_irq(x...) do {;} while (0)
|
||||
|
||||
#endif /* _H8300_KEYBOARD_H */
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#ifndef __LINUX_KVM_H8300_H
|
||||
#define __LINUX_KVM_H8300_H
|
||||
|
||||
/* h8300 does not support KVM */
|
||||
|
||||
#endif
|
||||
@@ -1,17 +0,0 @@
|
||||
/*
|
||||
* linux/include/asm-h8300/namei.h
|
||||
*
|
||||
* Included from linux/fs/namei.c
|
||||
*/
|
||||
|
||||
#ifndef __H8300_NAMEI_H
|
||||
#define __H8300_NAMEI_H
|
||||
|
||||
/* This dummy routine maybe changed to something useful
|
||||
* for /usr/gnemul/ emulation stuff.
|
||||
* Look at asm-sparc/namei.h for details.
|
||||
*/
|
||||
|
||||
#define __emul_prefix() NULL
|
||||
|
||||
#endif
|
||||
@@ -43,9 +43,6 @@ typedef struct page *pgtable_t;
|
||||
#define __pgd(x) ((pgd_t) { (x) } )
|
||||
#define __pgprot(x) ((pgprot_t) { (x) } )
|
||||
|
||||
/* to align the pointer to the (next) page boundary */
|
||||
#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
|
||||
|
||||
extern unsigned long memory_start;
|
||||
extern unsigned long memory_end;
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#include <linux/semaphore.h>
|
||||
@@ -49,6 +49,7 @@ struct thread_info {
|
||||
/*
|
||||
* Size of kernel stack for each process. This must be a power of 2...
|
||||
*/
|
||||
#define THREAD_SIZE_ORDER 1
|
||||
#define THREAD_SIZE 8192 /* 2 pages */
|
||||
|
||||
|
||||
@@ -65,10 +66,6 @@ static inline struct thread_info *current_thread_info(void)
|
||||
return ti;
|
||||
}
|
||||
|
||||
/* thread information allocation */
|
||||
#define alloc_thread_info(tsk) ((struct thread_info *) \
|
||||
__get_free_pages(GFP_KERNEL, 1))
|
||||
#define free_thread_info(ti) free_pages((unsigned long) (ti), 1)
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
/*
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
#include <asm/page.h>
|
||||
|
||||
|
||||
void hugetlb_free_pgd_range(struct mmu_gather **tlb, unsigned long addr,
|
||||
void hugetlb_free_pgd_range(struct mmu_gather *tlb, unsigned long addr,
|
||||
unsigned long end, unsigned long floor,
|
||||
unsigned long ceiling);
|
||||
|
||||
int prepare_hugepage_range(unsigned long addr, unsigned long len);
|
||||
int prepare_hugepage_range(struct file *file,
|
||||
unsigned long addr, unsigned long len);
|
||||
|
||||
static inline int is_hugepage_only_range(struct mm_struct *mm,
|
||||
unsigned long addr,
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* linux/include/asm-ia64/ide.h
|
||||
*
|
||||
* Copyright (C) 1994-1996 Linus Torvalds & authors
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file contains the ia64 architecture specific IDE code.
|
||||
*/
|
||||
|
||||
#ifndef __ASM_IA64_IDE_H
|
||||
#define __ASM_IA64_IDE_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
|
||||
#include <linux/irq.h>
|
||||
|
||||
static inline int ide_default_irq(unsigned long base)
|
||||
{
|
||||
switch (base) {
|
||||
case 0x1f0: return isa_irq_to_vector(14);
|
||||
case 0x170: return isa_irq_to_vector(15);
|
||||
case 0x1e8: return isa_irq_to_vector(11);
|
||||
case 0x168: return isa_irq_to_vector(10);
|
||||
case 0x1e0: return isa_irq_to_vector(8);
|
||||
case 0x160: return isa_irq_to_vector(12);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static inline unsigned long ide_default_io_base(int index)
|
||||
{
|
||||
switch (index) {
|
||||
case 0: return 0x1f0;
|
||||
case 1: return 0x170;
|
||||
case 2: return 0x1e8;
|
||||
case 3: return 0x168;
|
||||
case 4: return 0x1e0;
|
||||
case 5: return 0x160;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
#include <asm-generic/ide_iops.h>
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* __ASM_IA64_IDE_H */
|
||||
@@ -54,7 +54,7 @@ typedef void ia64_mv_dma_sync_single_for_cpu (struct device *, dma_addr_t, size_
|
||||
typedef void ia64_mv_dma_sync_sg_for_cpu (struct device *, struct scatterlist *, int, int);
|
||||
typedef void ia64_mv_dma_sync_single_for_device (struct device *, dma_addr_t, size_t, int);
|
||||
typedef void ia64_mv_dma_sync_sg_for_device (struct device *, struct scatterlist *, int, int);
|
||||
typedef int ia64_mv_dma_mapping_error (dma_addr_t dma_addr);
|
||||
typedef int ia64_mv_dma_mapping_error(struct device *, dma_addr_t dma_addr);
|
||||
typedef int ia64_mv_dma_supported (struct device *, u64);
|
||||
|
||||
typedef dma_addr_t ia64_mv_dma_map_single_attrs (struct device *, void *, size_t, int, struct dma_attrs *);
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
#ifndef _ASM_IA64_NAMEI_H
|
||||
#define _ASM_IA64_NAMEI_H
|
||||
|
||||
/*
|
||||
* Modified 1998, 1999, 2001
|
||||
* David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
|
||||
*/
|
||||
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
#define EMUL_PREFIX_LINUX_IA32 "/emul/ia32-linux/"
|
||||
|
||||
static inline char *
|
||||
__emul_prefix (void)
|
||||
{
|
||||
switch (current->personality) {
|
||||
case PER_LINUX32:
|
||||
return EMUL_PREFIX_LINUX_IA32;
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* _ASM_IA64_NAMEI_H */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user