Merge branch 'for-next/misc'
This commit is contained in:
commit
df1dcc057e
|
@ -155,7 +155,7 @@ static int do_cpuinfo(int argc, char *argv[])
|
|||
implementer, architecture);
|
||||
|
||||
if (cache & (1 << 24)) {
|
||||
/* seperate I/D cache */
|
||||
/* separate I/D cache */
|
||||
printf("I-cache: ");
|
||||
decode_cache(cache & 0xfff);
|
||||
printf("D-cache: ");
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <mach/devices.h>
|
||||
#include <mach/imx1-regs.h>
|
||||
|
||||
static inline struct device_d *imx1_add_uart0(void)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
#include <mach/devices.h>
|
||||
#include <mach/imx21-regs.h>
|
||||
|
||||
static inline struct device_d *imx21_add_uart0(void)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
#include <mach/devices.h>
|
||||
#include <mach/imx25-regs.h>
|
||||
|
||||
static inline struct device_d *imx25_add_i2c0(struct i2c_platform_data *pdata)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
#include <mach/devices.h>
|
||||
#include <mach/imx27-regs.h>
|
||||
|
||||
static inline struct device_d *imx27_add_spi0(struct spi_imx_master *pdata)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
#include <mach/devices.h>
|
||||
#include <mach/imx35-regs.h>
|
||||
|
||||
static inline struct device_d *imx35_add_i2c0(struct i2c_platform_data *pdata)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
#include <mach/devices.h>
|
||||
#include <sizes.h>
|
||||
#include <mach/devices.h>
|
||||
#include <mach/imx51-regs.h>
|
||||
|
||||
static inline struct device_d *imx51_add_spi0(struct spi_imx_master *pdata)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
#include <mach/devices.h>
|
||||
#include <mach/imx53-regs.h>
|
||||
|
||||
static inline struct device_d *imx53_add_spi0(struct spi_imx_master *pdata)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <mach/devices.h>
|
||||
#include <mach/imx6-regs.h>
|
||||
|
||||
static inline struct device_d *imx6_add_uart0(void)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#ifndef __MACH_GENERIC_H
|
||||
#define __MACH_GENERIC_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
u64 imx_uid(void);
|
||||
|
||||
void imx25_boot_save_loc(void __iomem *ccm_base);
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef __MACH_IOMUX_V1_H__
|
||||
#define __MACH_IOMUX_V1_H__
|
||||
|
||||
#include <linux/compiler.h>
|
||||
|
||||
#define GPIO_PIN_MASK 0x1f
|
||||
|
||||
#define GPIO_PORT_SHIFT 5
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef __MACH_WEIM_H
|
||||
#define __MACH_WEIM_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
void imx27_setup_weimcs(size_t cs, unsigned upper, unsigned lower,
|
||||
unsigned additional);
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
barebox.lds
|
|
@ -22,7 +22,7 @@ int globalvar_add(const char *name,
|
|||
* get a concatenated string of all globalvars beginning with 'match'.
|
||||
* This adds whitespaces between the different globalvars
|
||||
*/
|
||||
char *globalvar_get_match(const char *match, const char *seperator)
|
||||
char *globalvar_get_match(const char *match, const char *separator)
|
||||
{
|
||||
char *val = NULL;
|
||||
struct param_d *param;
|
||||
|
@ -31,7 +31,7 @@ char *globalvar_get_match(const char *match, const char *seperator)
|
|||
if (!strncmp(match, param->name, strlen(match))) {
|
||||
const char *p = dev_get_param(&global_device, param->name);
|
||||
if (val) {
|
||||
char *new = asprintf("%s%s%s", val, seperator, p);
|
||||
char *new = asprintf("%s%s%s", val, separator, p);
|
||||
free(val);
|
||||
val = new;
|
||||
} else {
|
||||
|
|
|
@ -1959,7 +1959,7 @@ BAREBOX_CMD_START(getopt)
|
|||
BAREBOX_CMD_END
|
||||
#endif
|
||||
|
||||
BAREBOX_MAGICVAR(PATH, "colon seperated list of pathes to search for executables");
|
||||
BAREBOX_MAGICVAR(PATH, "colon separated list of pathes to search for executables");
|
||||
#ifdef CONFIG_HUSH_FANCY_PROMPT
|
||||
BAREBOX_MAGICVAR(PS1, "hush prompt");
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#define pr_fmt(fmt) "gpiolib: " fmt
|
||||
|
||||
#include <init.h>
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
|
@ -32,20 +34,30 @@ static int gpio_ensure_requested(struct gpio_info *gi, int gpio)
|
|||
return gpio_request(gpio, "gpio");
|
||||
}
|
||||
|
||||
static struct gpio_info *gpio_to_desc(unsigned gpio)
|
||||
{
|
||||
if (gpio_is_valid(gpio))
|
||||
if (gpio_desc[gpio].chip)
|
||||
return &gpio_desc[gpio];
|
||||
|
||||
pr_warning("invalid GPIO %d\n", gpio);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int gpio_request(unsigned gpio, const char *label)
|
||||
{
|
||||
struct gpio_info *gi = &gpio_desc[gpio];
|
||||
struct gpio_chip *chip = gi->chip;
|
||||
struct gpio_info *gi = gpio_to_desc(gpio);
|
||||
int ret;
|
||||
|
||||
if (!gpio_is_valid(gpio))
|
||||
return -EINVAL;
|
||||
if (!chip)
|
||||
return -EINVAL;
|
||||
if (!gi)
|
||||
return -ENODEV;
|
||||
|
||||
if (gi->requested)
|
||||
return -EBUSY;
|
||||
if (chip->ops->request) {
|
||||
ret = chip->ops->request(chip, gpio - chip->base);
|
||||
|
||||
if (gi->chip->ops->request) {
|
||||
ret = gi->chip->ops->request(gi->chip, gpio - gi->chip->base);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
@ -58,17 +70,16 @@ int gpio_request(unsigned gpio, const char *label)
|
|||
|
||||
void gpio_free(unsigned gpio)
|
||||
{
|
||||
struct gpio_info *gi = &gpio_desc[gpio];
|
||||
struct gpio_chip *chip = gi->chip;
|
||||
struct gpio_info *gi = gpio_to_desc(gpio);
|
||||
|
||||
if (!gpio_is_valid(gpio))
|
||||
return;
|
||||
if (!chip)
|
||||
if (!gi)
|
||||
return;
|
||||
|
||||
if (!gi->requested)
|
||||
return;
|
||||
if (chip->ops->free)
|
||||
chip->ops->free(chip, gpio - chip->base);
|
||||
|
||||
if (gi->chip->ops->free)
|
||||
gi->chip->ops->free(gi->chip, gpio - gi->chip->base);
|
||||
|
||||
gi->requested = false;
|
||||
free(gi->label);
|
||||
|
@ -76,75 +87,71 @@ void gpio_free(unsigned gpio)
|
|||
|
||||
void gpio_set_value(unsigned gpio, int value)
|
||||
{
|
||||
struct gpio_info *gi = &gpio_desc[gpio];
|
||||
struct gpio_chip *chip = gi->chip;
|
||||
struct gpio_info *gi = gpio_to_desc(gpio);
|
||||
|
||||
if (!gpio_is_valid(gpio))
|
||||
return;
|
||||
if (!chip)
|
||||
if (!gi)
|
||||
return;
|
||||
|
||||
if (gpio_ensure_requested(gi, gpio))
|
||||
return;
|
||||
if (!chip->ops->set)
|
||||
return;
|
||||
chip->ops->set(chip, gpio - chip->base, value);
|
||||
|
||||
if (gi->chip->ops->set)
|
||||
gi->chip->ops->set(gi->chip, gpio - gi->chip->base, value);
|
||||
}
|
||||
EXPORT_SYMBOL(gpio_set_value);
|
||||
|
||||
int gpio_get_value(unsigned gpio)
|
||||
{
|
||||
struct gpio_info *gi = &gpio_desc[gpio];
|
||||
struct gpio_chip *chip = gi->chip;
|
||||
struct gpio_info *gi = gpio_to_desc(gpio);
|
||||
int ret;
|
||||
|
||||
if (!gpio_is_valid(gpio))
|
||||
return -EINVAL;
|
||||
if (!chip)
|
||||
if (!gi)
|
||||
return -ENODEV;
|
||||
|
||||
ret = gpio_ensure_requested(gi, gpio);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (!chip->ops->get)
|
||||
|
||||
if (!gi->chip->ops->get)
|
||||
return -ENOSYS;
|
||||
return chip->ops->get(chip, gpio - chip->base);
|
||||
return gi->chip->ops->get(gi->chip, gpio - gi->chip->base);
|
||||
}
|
||||
EXPORT_SYMBOL(gpio_get_value);
|
||||
|
||||
int gpio_direction_output(unsigned gpio, int value)
|
||||
{
|
||||
struct gpio_info *gi = &gpio_desc[gpio];
|
||||
struct gpio_chip *chip = gi->chip;
|
||||
struct gpio_info *gi = gpio_to_desc(gpio);
|
||||
int ret;
|
||||
|
||||
if (!gpio_is_valid(gpio))
|
||||
return -EINVAL;
|
||||
if (!chip)
|
||||
if (!gi)
|
||||
return -ENODEV;
|
||||
|
||||
ret = gpio_ensure_requested(gi, gpio);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (!chip->ops->direction_output)
|
||||
|
||||
if (!gi->chip->ops->direction_output)
|
||||
return -ENOSYS;
|
||||
return chip->ops->direction_output(chip, gpio - chip->base, value);
|
||||
return gi->chip->ops->direction_output(gi->chip, gpio - gi->chip->base,
|
||||
value);
|
||||
}
|
||||
EXPORT_SYMBOL(gpio_direction_output);
|
||||
|
||||
int gpio_direction_input(unsigned gpio)
|
||||
{
|
||||
struct gpio_info *gi = &gpio_desc[gpio];
|
||||
struct gpio_chip *chip = gi->chip;
|
||||
struct gpio_info *gi = gpio_to_desc(gpio);
|
||||
int ret;
|
||||
|
||||
if (!gpio_is_valid(gpio))
|
||||
return -EINVAL;
|
||||
if (!chip)
|
||||
if (!gi)
|
||||
return -ENODEV;
|
||||
|
||||
ret = gpio_ensure_requested(gi, gpio);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (!chip->ops->direction_input)
|
||||
|
||||
if (!gi->chip->ops->direction_input)
|
||||
return -ENOSYS;
|
||||
return chip->ops->direction_input(chip, gpio - chip->base);
|
||||
return gi->chip->ops->direction_input(gi->chip, gpio - gi->chip->base);
|
||||
}
|
||||
EXPORT_SYMBOL(gpio_direction_input);
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This is a driver for the SDHC controller found in Freescale MX2/MX3
|
||||
* SoCs. It is basically the same hardware as found on MX1 (imxmmc.c).
|
||||
* Unlike the hardware found on MX1, this hardware just works and does
|
||||
* not need all the quirks found in imxmmc.c, hence the seperate driver.
|
||||
* not need all the quirks found in imxmmc.c, hence the separate driver.
|
||||
*
|
||||
* Copyright (C) 2009 Ilya Yanok, <yanok@emcraft.com>
|
||||
* Copyright (C) 2008 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de>
|
||||
|
|
|
@ -707,6 +707,7 @@ static int fec_probe(struct device_d *dev)
|
|||
|
||||
if (dev->device_node) {
|
||||
ret = fec_probe_dt(dev, fec);
|
||||
fec->phy_addr = -1;
|
||||
} else if (pdata) {
|
||||
fec->interface = pdata->xcv_type;
|
||||
fec->phy_init = pdata->phy_init;
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
#ifndef _ENVIRONMENT_H_
|
||||
#define _ENVIRONMENT_H_
|
||||
|
||||
#include <linux/list.h>
|
||||
|
||||
/**
|
||||
* Managment of a environment variable
|
||||
*/
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <ioctl.h>
|
||||
#include <param.h>
|
||||
#include <driver.h>
|
||||
|
||||
#define FB_VISUAL_TRUECOLOR 2 /* True color */
|
||||
#define FB_VISUAL_PSEUDOCOLOR 3 /* Pseudo color (like atari) */
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef __FILE_TYPE_H
|
||||
#define __FILE_TYPE_H
|
||||
|
||||
#include <linux/string.h>
|
||||
|
||||
/*
|
||||
* List of file types we know
|
||||
*/
|
||||
|
|
|
@ -8,7 +8,7 @@ int globalvar_add(const char *name,
|
|||
int (*set)(struct device_d *dev, struct param_d *p, const char *val),
|
||||
const char *(*get)(struct device_d *, struct param_d *p),
|
||||
unsigned long flags);
|
||||
char *globalvar_get_match(const char *match, const char *seperator);
|
||||
char *globalvar_get_match(const char *match, const char *separator);
|
||||
void globalvar_set_match(const char *match, const char *val);
|
||||
#else
|
||||
static inline int globalvar_add_simple(const char *name)
|
||||
|
@ -24,7 +24,7 @@ static inline int globalvar_add(const char *name,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline char *globalvar_get_match(const char *match, const char *seperator)
|
||||
static inline char *globalvar_get_match(const char *match, const char *separator)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
#ifndef I2C_I2C_H
|
||||
#define I2C_I2C_H
|
||||
|
||||
#include <driver.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
/*
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
#define IH_ARCH IH_ARCH_PPC
|
||||
#elif defined(__ARM__)
|
||||
#define IH_ARCH IH_ARCH_ARM
|
||||
#elif defined(__I386__) || defined(__x86_64__)
|
||||
#elif defined(__I386__) || defined(__x86_64__) || defined(__i386__)
|
||||
#define IH_ARCH IH_ARCH_I386
|
||||
#elif defined(__mips__)
|
||||
#define IH_ARCH IH_ARCH_MIPS
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#ifndef __PHY_H
|
||||
#define __PHY_H
|
||||
|
||||
#include <driver.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/ethtool.h>
|
||||
#include <linux/mii.h>
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
#ifndef __MFD_MC13XXX_H
|
||||
#define __MFD_MC13XXX_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define MC13XXX_REG_IDENTIFICATION 0x07
|
||||
|
||||
#define MC13783_REG_INT_STATUS0 0x00
|
||||
|
|
|
@ -19,7 +19,9 @@
|
|||
#include <stdlib.h>
|
||||
#include <clock.h>
|
||||
#include <led.h>
|
||||
#include <xfuncs.h>
|
||||
#include <linux/phy.h>
|
||||
#include <linux/string.h> /* memcpy */
|
||||
#include <asm/byteorder.h> /* for nton* / ntoh* stuff */
|
||||
|
||||
/* How often do we retry to send packages */
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef __NOTIFIER_H
|
||||
#define __NOTIFIER_H
|
||||
|
||||
#include <linux/list.h>
|
||||
|
||||
/*
|
||||
* Notifer chains loosely based on the according Linux framework
|
||||
*/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef __PARTITION_H
|
||||
#define __PARTITION_H
|
||||
|
||||
struct device_d;
|
||||
#include <driver.h>
|
||||
|
||||
struct partition {
|
||||
int num;
|
||||
|
@ -18,4 +18,3 @@ struct partition {
|
|||
};
|
||||
|
||||
#endif /* __PARTITION_H */
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
#include <driver.h>
|
||||
#include <linux/string.h>
|
||||
|
||||
struct spi_board_info {
|
||||
char *name;
|
||||
|
|
Loading…
Reference in New Issue