162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci 362306a36Sopenharmony_ci#include <linux/platform_device.h> 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci#ifndef _SOFTING_DEVICE_H_ 662306a36Sopenharmony_ci#define _SOFTING_DEVICE_H_ 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci/* softing firmware directory prefix */ 962306a36Sopenharmony_ci#define fw_dir "softing-4.6/" 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_cistruct softing_platform_data { 1262306a36Sopenharmony_ci unsigned int manf; 1362306a36Sopenharmony_ci unsigned int prod; 1462306a36Sopenharmony_ci /* 1562306a36Sopenharmony_ci * generation 1662306a36Sopenharmony_ci * 1st with NEC or SJA1000 1762306a36Sopenharmony_ci * 8bit, exclusive interrupt, ... 1862306a36Sopenharmony_ci * 2nd only SJA1000 1962306a36Sopenharmony_ci * 16bit, shared interrupt 2062306a36Sopenharmony_ci */ 2162306a36Sopenharmony_ci int generation; 2262306a36Sopenharmony_ci int nbus; /* # buses on device */ 2362306a36Sopenharmony_ci unsigned int freq; /* operating frequency in Hz */ 2462306a36Sopenharmony_ci unsigned int max_brp; 2562306a36Sopenharmony_ci unsigned int max_sjw; 2662306a36Sopenharmony_ci unsigned long dpram_size; 2762306a36Sopenharmony_ci const char *name; 2862306a36Sopenharmony_ci struct { 2962306a36Sopenharmony_ci unsigned long offs; 3062306a36Sopenharmony_ci unsigned long addr; 3162306a36Sopenharmony_ci const char *fw; 3262306a36Sopenharmony_ci } boot, load, app; 3362306a36Sopenharmony_ci /* 3462306a36Sopenharmony_ci * reset() function 3562306a36Sopenharmony_ci * bring pdev in or out of reset, depending on value 3662306a36Sopenharmony_ci */ 3762306a36Sopenharmony_ci int (*reset)(struct platform_device *pdev, int value); 3862306a36Sopenharmony_ci int (*enable_irq)(struct platform_device *pdev, int value); 3962306a36Sopenharmony_ci}; 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ci#endif 42