summaryrefslogtreecommitdiff
path: root/arch/blackfin/mach-bf533/boards
AgeCommit message (Collapse)Author
2017-10-30i2c: gpio: Augment all boardfiles to use open drainLinus Walleij
We now handle the open drain mode internally in the I2C GPIO driver, but we will get warnings from the gpiolib that we override the default mode of the line so it becomes open drain. We can fix all in-kernel users by simply passing the right flag along in the descriptor table, and we already touched all of these files in the series so let's just tidy it up. Cc: Steven Miao <realmz6@gmail.com> Cc: Ralf Baechle <ralf@linux-mips.org> Acked-by: Olof Johansson <olof@lixom.net> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Ralf Baechle <ralf@linux-mips.org> Acked-by: Wu, Aaron <Aaron.Wu@analog.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-10-30i2c: gpio: Convert to use descriptorsLinus Walleij
This converts the GPIO-based I2C-driver to using GPIO descriptors instead of the old global numberspace-based GPIO interface. We: - Convert the driver to unconditionally grab two GPIOs from the device by index 0 (SDA) and 1 (SCL) which will work fine with device tree and descriptor tables. The existing device trees will continue to work just like before, but without any roundtrip through the global numberspace. - Brutally convert all boardfiles still passing global GPIOs by registering descriptor tables associated with the devices instead so this driver does not need to keep supporting passing any GPIO numbers as platform data. There is no stepwise approach as elegant as this, I strongly prefer this big hammer over any antsteps for this conversion. This way the old GPIO numbers go away and NEVER COME BACK. Special conversion for the different boards utilizing I2C-GPIO: - EP93xx (arch/arm/mach-ep93xx): pretty straight forward as all boards were using the same two GPIO lines, just define these two in a lookup table for "i2c-gpio" and register these along with the device. None of them define any other platform data so just pass NULL as platform data. This platform selects GPIOLIB so all should be smooth. The pins appear on a gpiochip for bank "G" as pins 1 (SDA) and 0 (SCL). - IXP4 (arch/arm/mach-ixp4): descriptor tables have to be registered for each board separately. They all use "IXP4XX_GPIO_CHIP" so it is pretty straight forward. Most board define no other platform data than SCL/SDA so they can drop the #include of <linux/i2c-gpio.h> and assign NULL to platform data. The "goramo_mlr" (Goramo Multilink Router) board is a bit worrisome: it implements its own I2C bit-banging in the board file, and optionally registers an I2C serial port, but claims the same GPIO lines for itself in the board file. This is not going to work: there will be competition for the GPIO lines, so delete the optional extra I2C bus instead, no I2C devices are registered on it anyway, there are just hints that it may contain an EEPROM that may be accessed from userspace. This needs to be fixed up properly by the serial clock using I2C emulation so drop a note in the code. - KS8695 board acs5k (arch/arm/mach-ks8695/board-acs5.c) has some platform data in addition to the pins so it needs to be kept around sans GPIO lines. Its GPIO chip is named "KS8695" and the arch selects GPIOLIB. - PXA boards (arch/arm/mach-pxa/*) use some of the platform data so it needs to be preserved here. The viper board even registers two GPIO I2Cs. The gpiochip is named "gpio-pxa" and the arch selects GPIOLIB. - SA1100 Simpad (arch/arm/mach-sa1100/simpad.c) defines a GPIO I2C bus, and the arch selects GPIOLIB. - Blackfin boards (arch/blackfin/bf533 etc) for these I assume their I2C GPIOs refer to the local gpiochip defined in arch/blackfin/kernel/bfin_gpio.c names "BFIN-GPIO". The arch selects GPIOLIB. The boards get spiked with IF_ENABLED(I2C_GPIO) but that is a side effect of it being like that already (I would just have Kconfig select I2C_GPIO and get rid of them all.) I also delete any platform data set to 0 as it will get that value anyway from static declartions of platform data. - The MIPS selects GPIOLIB and the Alchemy machine is using two local GPIO chips, one of them has a GPIO I2C. We need to adjust the local offset from the global number space here. The ATH79 has a proper GPIO driver in drivers/gpio/gpio-ath79.c and AFAICT the chip is named "ath79-gpio" and the PB44 PCF857x expander spawns from this on GPIO 1 and 0. The latter board only use the platform data to specify pins so it can be cut altogether after this. - The MFD Silicon Motion SM501 is a special case. It dynamically spawns an I2C bus off the MFD using sm501_create_subdev(). We use an approach to dynamically create a machine descriptor table and attach this to the "SM501-LOW" or "SM501-HIGH" gpiochip. We use chip-local offsets to grab the right lines. We can get rid of two local static inline helpers as part of this refactoring. Cc: Steven Miao <realmz6@gmail.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Magnus Damm <magnus.damm@gmail.com> Cc: Ben Dooks <ben.dooks@codethink.co.uk> Cc: Heiko Schocher <hs@denx.de> Acked-by: Wu, Aaron <Aaron.Wu@analog.com> Acked-by: Olof Johansson <olof@lixom.net> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Ralf Baechle <ralf@linux-mips.org> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-01-08arch/blackfin/mach-bf533/boards/stamp.c: add linux/delay.hOleg Nesterov
build error arch/blackfin/mach-bf533/boards/stamp.c:834:2: error: implicit declaration of function 'mdelay' Signed-off-by: Oleg Nesterov <oleg@redhat.com> Reported-by: Wu Fengguang <fengguang.wu@intel.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-07-26blackfin: fix some bf5xx boards build for missing <linux/gpio.h>Steven Miao
Signed-off-by: Steven Miao <realmz6@gmail.com>
2014-06-10bf533: fix build error: add linux/gpio.hSteven Miao
build error arch/blackfin/mach-bf533/boards/stamp.c: In function ‘stamp_init’: arch/blackfin/mach-bf533/boards/stamp.c:866: error: implicit declaration of function ‘gpio_request’ arch/blackfin/mach-bf533/boards/stamp.c:868: error: implicit declaration of function ‘gpio_direction_output’ arch/blackfin/mach-bf533/boards/stamp.c:869: error: implicit declaration of function ‘gpio_free’ Signed-off-by: Steven Miao <realmz6@gmail.com>
2014-04-12blackfin: cleanup board filesSteven Miao
using IS_ENABLED() macro instead of defined(CONFIG_XXX) || defined(CONFIG_XXX_MODULE) Signed-off-by: Steven Miao <realmz6@gmail.com>
2014-01-29Add platfrom device resource for bfin-sport on bf533 stampAaron Wu
Signed-off-by: Aaron Wu <Aaron.wu@analog.com> Signed-off-by: Steven Miao <realmz6@gmail.com>
2013-06-01blackfin: bf533-stamp: Remove bogus "||"Geert Uytterhoeven
arch/blackfin/mach-bf533/boards/stamp.c:545:2: error: operator '||' has no right operand arch/blackfin/mach-bf533/boards/stamp.c:662:3: error: 'bfin_snd_resources' undeclared here (not in a function) arch/blackfin/mach-bf533/boards/stamp.c:662:3: error: negative width in bit-field '<anonymous>' arch/blackfin/mach-bf533/boards/stamp.c:665:21: error: 'bfin_snd_data' undeclared here (not in a function) make[4]: *** [arch/blackfin/mach-bf533/boards/stamp.o] Error 1 Introduced by commit 15502e0ca0da651b48c7def2983e7bb464349b2a ("blackfin: Remove references to the bf5x_tdm driver"), which removed two config options, but only one "||". Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-05-30blackfin: Remove references to the bf5x_tdm driverLars-Peter Clausen
The bf5x_tdm driver has been removed. Remove all references to it from board code. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30ASoC: blackfin: Switch bf5xx-ad1836 from bf5xx-tdm to bf5xx-i2sLars-Peter Clausen
The bf5xx-i2s driver now has support for TDM mode and the bf5xx-tdm driver is going to be removed soon, so switch the driver over to bf5xx-i2s. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-17blackfin: add platform device for ad1836 machine driverScott Jiang
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-09blackfin: i2c-lcd: change default clock rateAaron Wu
Change default clock rate of GPIO based I2C operation for BF533 and BF561 to bring up the I2C interface LCD display Signed-off-by: Aaron Wu <Aaron.Wu@analog.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-01-09blackfin: config: update macro SPI_BFIN in board fileSonic Zhang
Macro name for spi controller driver has been modified, so update default board file accordingly. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-01-09blackfin: bf533-stamp: add missed patches for new asoc driverBob Liu
ASoC drivers changed between 2.6.37 and 3.0, but we didn't apply these changes in bf533 board file. So apply missed patches for asoc since 2.6.37 together. Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-01-09blackfin: bf533-stamp: fix ad1836 nameBob Liu
The ASoC codec name is "ad1836" and not "ad183x" as the change to rename things ultimately did not get merged. Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2011-11-14Blackfin: add serial TX IRQ in individual platform resourceSonic Zhang
The serial TX IRQ is not simply (RX IRQ + 1) on some Blackfin chips, so move the values to the platform resources. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2011-10-25Blackfin: H8606: fixup bogus ioresource initThomas Gleixner
IRQF_SHARED is not part of the IORESOURCE_IRQ bits. It's expressed by IORESOURCE_IRQ_SHAREABLE. IORESOURCE_IRQ_HIGHEDGE and IRQF_TRIGGER_HIGH are contradicting values, an interrupt can hardly be configured for both level and edge at the same time. This was introduced in commit 45138439(Blackfin arch: flash memory map and dm9000 resources updating) of course without any hint in the changelog what the heck this is supposed to do. Acked-by: Javier Herrero <jherrero@hvsistemas.es> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23Blackfin: boards: clean up redundant/dead spi resourcesMike Frysinger
The default for the Blackfin SPI driver is 8 bits and dma disabled, so many of the bfin5xx_spi_chip resources are redundant. So punt those parts. Further, drivers should themselves be declaring 16 bit transfers, so for those that do, and for the ones which no longer do 16 bit transfers, drop the bfin5xx_spi_chip resources. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23Blackfin: net2272: move pin setup to boards filesMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-03-18Blackfin: ip0x: fix unused variable warningMike Frysinger
The previous commit that changed this code to the common GPIO layers forgot to delete the local and now unused "i" variable. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10Blackfin: boards: add missing "static" to peripheral listsMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10Blackfin: sport_uart resources: remove unused secondary RX/TX pinsSonic Zhang
The SPORT/UART driver doesn't use the secondary channel pins, so don't try and request them thus keeping other drivers from using them. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10Blackfin: bf533: convert boards to gpio frameworkMike Frysinger
We don't want people banging on MMRs directly. As for the ip0x board, it shouldn't need to muck with the CS pin directly as the Blackfin SPI bus master driver takes care of driving this. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: H8606: move 8250 irqflags to platform resourcesMike Frysinger
Now that the common 8250 serial driver supports an "irqflags" field, we don't need to patch in a custom define into the code. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: boards: add example i2c resources for ad525x devicessteven miao
Signed-off-by: steven miao <realmz6@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: i2c-gpio boards: use GPIO_PF# definesMike Frysinger
Rather than use raw numbers for the GPIO pins, use proper GPIO defines. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: boards: use proper irq flags with isp1362-hcdMichael Hennerich
With the recent kernel update the isp1362-hcd driver evaluates the IORESOURCE_IRQ resource flags and requests the irq with the given polarity/edge settings. However the ISP1362 config requires low level/edge interrupts. Most of the Blackfin boards use some random flag or no flag at all. Make all boards use a know good flag IORESOURCE_IRQ_LOWEDGE. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: boards: update AD183x resourcesBarry Song
Make sure we use the right Kconfig names and platform strings. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-07Blackfin: Split the BF532 BFIN_*_FIO_FLAG() functions to their own headerDavid Howells
Split the BF532 machine type BFIN_*_FIO_FLAG() functions to their own header file to avoid circular #include problems as these functions require IRQ flag handling, which requires asm/blackfin.h, which otherwise requires the header file that defines these functions. For good measure, also get rid of the inclusion of asm/blackfin.h from mach/cdefBF532.h (which is circular) and defBF532.h (which is included by asm/blackfin.h before including this header). Signed-off-by: David Howells <dhowells@redhat.com>
2010-03-09Blackfin: rename AD1836 to AD183X in board filesBarry Song
The ASoC codec driver was generalized and renamed, so update the board resources accordingly. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: bf533-{ezkit,stamp}: add sound platform devicesBarry Song
Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: add UART/SPORT early platform resourcesSonic Zhang
This lets people easily select the UART/SPORT consoles for early printk while leveraging the pins declared in the boards file. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: move SPORT UART resources to boards filesSonic Zhang
Rather than keeping the pins in the actual driver and worrying about a mess of Kconfig options, declare all the desired pin resources in the boards file. This lets people easily select the specific pins/ports for the normal emulated UART as well as GPIOs for CTS/RTS. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: move on-chip UART resources to boards filesSonic Zhang
Rather than keeping the pins in the actual driver and worrying about a mess of Kconfig options, declare all the desired pin resources in the boards file. This lets people easily select the specific pins/ports for the normal UART as well as GPIOs for CTS/RTS. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15Blackfin: ip0x: pull in asm/portmux.h for P_xxx definesMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15Blackfin: H8606/ip0x: drop redundant SPI ctl_reg settingsMike Frysinger
No need to set MSTR in .ctl_reg as the Blackfin SPI bus driver does this already for all parts. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15Blackfin: clean up bf537-lq035 board resourcesMichael Hennerich
Now that the driver has been updated, convert the board resources to the new i2c framework for managing slaves. For boards that don't actually hook up to this hardware, simply drop the resources altogether. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-08Blackfin: drop all simple-gpio board resourcesMike Frysinger
The simple-gpio has been replaced by the gpio sysfs interface, so drop the unused simple-gpio resources from all Blackfin boards. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-08Blackfin: drop cs_change_per_word settingMike Frysinger
Structs get initialized to 0 already, and we want to punt this field, so scrub it from all of our boards. Reported-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-08Blackfin: bf533-ezkit: convert to physmap/jedec_probeMike Frysinger
Now that the common jedec_probe supports the ST PSD4256G6V, no need to use the custom stm_flash driver. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-08Blackfin: convert adv7393 resources to new i2c frameworkMichael Hennerich
Now that the driver has been updated, convert the board resources to the new i2c framework for managing slaves. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-07Blackfin: mass clean up of copyright/licensing infoRobin Getz
Bill Gatliff & David Brownell pointed out we were missing some copyrights, and licensing terms in some of the files in ./arch/blackfin, so this fixes things, and cleans them up. It also removes: - verbose GPL text(refer to the top level ./COPYING file) - file names (you are looking at the file) - bug url (it's in the ./MAINTAINERS file) - "or later" on GPL-2, when we did not have that right It also allows some Blackfin-specific assembly files to be under a BSD like license (for people to use them outside of Linux). Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16Blackfin: update cm board resourcesHarald Krapfenbauer
Signed-off-by: Harald Krapfenbauer <Harald.Krapfenbauer@bluetechnix.at> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16Blackfin: delete '-spi' suffix in ad1836/ad1938 driver nameBarry Song
The ASoC drivers have dropped the redundant "-spi" suffix in the driver name, so update the board resources accordingly. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16Blackfin: drop board resources for dead devices (pbx/ad9960)Mike Frysinger
These hardware devices are dead and the drivers never cleaned up/merged, so punt the useless board resource info. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16Blackfin: convert boards to use platform data with smc91xMichael Hennerich
Latest smc91x driver allows you to specify settings in board resources rather than needing CONFIG_BLACKFIN in the drivers/net/smc91x.h header. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16Blackfin: bf533-stamp: fix typo in SPI frequency for ad1836 codecCliff Cai
One too many zeros means we run way faster than the codec can handle. Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16Blackfin: bf533-stamp: add resources for mmc_spi cardYi Li
Signed-off-by: Yi Li <yi.li@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16Blackfin: rename PCF8574 driver configMichael Hennerich
The "TWI_KEYPAD" driver was renamed to "INPUT_PCF8574", so update the defines in the board resources accordingly. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-16Blackfin: fix incomplete renaming of the bfin-twi-lcd driverMichael Hennerich
The sed used to rename the bfin-twi-lcd only replaced the first instance rather than all which led to the resources not being enabled when the driver was built as a module. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>