linux/include/linux/sm501.h

/* SPDX-License-Identifier: GPL-2.0-only */
/* include/linux/sm501.h
 *
 * Copyright (c) 2006 Simtec Electronics
 *	Ben Dooks <[email protected]>
 *	Vincent Sanders <[email protected]>
*/

extern int sm501_unit_power(struct device *dev,
			    unsigned int unit, unsigned int to);

extern unsigned long sm501_set_clock(struct device *dev,
				     int clksrc, unsigned long freq);

extern unsigned long sm501_find_clock(struct device *dev,
				      int clksrc, unsigned long req_freq);

/* sm501_misc_control
 *
 * Modify the SM501's MISC_CONTROL register
*/

extern int sm501_misc_control(struct device *dev,
			      unsigned long set, unsigned long clear);

/* sm501_modify_reg
 *
 * Modify a register in the SM501 which may be shared with other
 * drivers.
*/

extern unsigned long sm501_modify_reg(struct device *dev,
				      unsigned long reg,
				      unsigned long set,
				      unsigned long clear);


/* Platform data definitions */

#define SM501FB_FLAG_USE_INIT_MODE
#define SM501FB_FLAG_DISABLE_AT_EXIT
#define SM501FB_FLAG_USE_HWCURSOR
#define SM501FB_FLAG_USE_HWACCEL
#define SM501FB_FLAG_PANEL_NO_FPEN
#define SM501FB_FLAG_PANEL_NO_VBIASEN
#define SM501FB_FLAG_PANEL_INV_FPEN
#define SM501FB_FLAG_PANEL_INV_VBIASEN

struct sm501_platdata_fbsub {};

enum sm501_fb_routing {};

/* sm501_platdata_fb flag field bit definitions */

#define SM501_FBPD_SWAP_FB_ENDIAN

/* sm501_platdata_fb
 *
 * configuration data for the framebuffer driver
*/

struct sm501_platdata_fb {};

/* gpio i2c
 *
 * Note, we have to pass in the bus number, as the number used will be
 * passed to the i2c-gpio driver's platform_device.id, subsequently used
 * to register the i2c bus.
*/

struct sm501_platdata_gpio_i2c {};

/* sm501_initdata
 *
 * use for initialising values that may not have been setup
 * before the driver is loaded.
*/

struct sm501_reg_init {};

#define SM501_USE_USB_HOST
#define SM501_USE_USB_SLAVE
#define SM501_USE_SSP0
#define SM501_USE_SSP1
#define SM501_USE_UART0
#define SM501_USE_UART1
#define SM501_USE_FBACCEL
#define SM501_USE_AC97
#define SM501_USE_I2S
#define SM501_USE_GPIO

#define SM501_USE_ALL

struct sm501_initdata {};

/* sm501_init_gpio
 *
 * default gpio settings
*/

struct sm501_init_gpio {};

#define SM501_FLAG_SUSPEND_OFF

/* sm501_platdata
 *
 * This is passed with the platform device to allow the board
 * to control the behaviour of the SM501 driver(s) which attach
 * to the device.
 *
*/

struct sm501_platdata {};

#if defined(CONFIG_PPC32)
#define smc501_readl
#define smc501_writel
#else
#define smc501_readl(addr)
#define smc501_writel(val, addr)
#endif