/Linux-v4.19/drivers/fmc/ |
D | fmc-core.c | 75 struct fmc_device *fmc = container_of(dev, struct fmc_device, dev); in fmc_release() local 77 kfree(fmc); in fmc_release() 89 struct fmc_device *fmc; in fmc_read_eeprom() local 93 fmc = container_of(dev, struct fmc_device, dev); in fmc_read_eeprom() 94 eelen = fmc->eeprom_len; in fmc_read_eeprom() 101 memcpy(buf, fmc->eeprom + off, count); in fmc_read_eeprom() 110 struct fmc_device *fmc; in fmc_write_eeprom() local 113 fmc = container_of(dev, struct fmc_device, dev); in fmc_write_eeprom() 114 return fmc->op->write_ee(fmc, off, buf, count); in fmc_write_eeprom() 124 int fmc_irq_request(struct fmc_device *fmc, irq_handler_t h, in fmc_irq_request() argument [all …]
|
D | fmc-match.c | 54 int fmc_fill_id_info(struct fmc_device *fmc) in fmc_fill_id_info() argument 61 if (fmc->eeprom_len && !fmc->eeprom) { in fmc_fill_id_info() 62 fmc->eeprom = kzalloc(fmc->eeprom_len, GFP_KERNEL); in fmc_fill_id_info() 63 if (!fmc->eeprom) in fmc_fill_id_info() 66 ret = fmc_read_ee(fmc, 0, fmc->eeprom, fmc->eeprom_len); in fmc_fill_id_info() 72 if (!fmc->eeprom) in fmc_fill_id_info() 75 dev_info(fmc->hwdev, "mezzanine %i\n", fmc->slot_id); /* header */ in fmc_fill_id_info() 78 h = (void *)fmc->eeprom; in fmc_fill_id_info() 92 fmc->id.manufacturer = fru_get_board_manufacturer(h); in fmc_fill_id_info() 93 fmc->id.product_name = fru_get_product_name(h); in fmc_fill_id_info() [all …]
|
D | Makefile | 3 obj-$(CONFIG_FMC) += fmc.o 5 fmc-y = fmc-core.o 6 fmc-y += fmc-match.o 7 fmc-y += fmc-sdb.o 8 fmc-y += fru-parse.o 9 fmc-y += fmc-dump.o 10 fmc-y += fmc-debug.o 12 obj-$(CONFIG_FMC_FAKEDEV) += fmc-fakedev.o 13 obj-$(CONFIG_FMC_TRIVIAL) += fmc-trivial.o 14 obj-$(CONFIG_FMC_WRITE_EEPROM) += fmc-write-eeprom.o [all …]
|
D | fmc-fakedev.c | 90 struct fmc_device *fmc[FF_MAX_MEZZANINES]; member 96 static int ff_reprogram(struct fmc_device *fmc, struct fmc_driver *drv, in ff_reprogram() argument 104 fmc->flags &= ~FMC_DEVICE_HAS_CUSTOM; in ff_reprogram() 105 fmc->flags |= FMC_DEVICE_HAS_GOLDEN; in ff_reprogram() 109 dev_info(&fmc->dev, "reprogramming with %s\n", gw); in ff_reprogram() 110 ret = request_firmware(&fw, gw, &fmc->dev); in ff_reprogram() 112 dev_warn(&fmc->dev, "request firmware \"%s\": error %i\n", in ff_reprogram() 116 fmc->flags &= ~FMC_DEVICE_HAS_GOLDEN; in ff_reprogram() 117 fmc->flags |= FMC_DEVICE_HAS_CUSTOM; in ff_reprogram() 124 static int ff_irq_request(struct fmc_device *fmc, irq_handler_t handler, in ff_irq_request() argument [all …]
|
D | fmc-chardev.c | 25 struct fmc_device *fmc; member 32 struct fmc_device *fmc; in fc_open() local 41 fmc = fc->fmc; in fc_open() 42 if (try_module_get(fmc->owner) == 0) in fc_open() 45 f->private_data = fmc; in fc_open() 51 struct fmc_device *fmc = f->private_data; in fc_release() local 52 module_put(fmc->owner); in fc_release() 60 struct fmc_device *fmc = f->private_data; in fc_read() local 69 if (addr > fmc->memlen) in fc_read() 71 val = fmc_readl(fmc, addr); in fc_read() [all …]
|
D | fmc-write-eeprom.c | 32 static int fwe_run_tlv(struct fmc_device *fmc, const struct firmware *fw, in fwe_run_tlv() argument 45 dev_err(&fmc->dev, "invalid tlv at offset %ti\n", in fwe_run_tlv() 51 dev_info(&fmc->dev, "write %i bytes at 0x%04x\n", in fwe_run_tlv() 53 err = fmc_write_ee(fmc, thisaddr, p + 5, thislen); in fwe_run_tlv() 56 dev_err(&fmc->dev, "write failure @0x%04x\n", in fwe_run_tlv() 64 dev_info(&fmc->dev, "write_eeprom: success\n"); in fwe_run_tlv() 68 static int fwe_run_bin(struct fmc_device *fmc, const struct firmware *fw) in fwe_run_bin() argument 72 dev_info(&fmc->dev, "programming %zi bytes\n", fw->size); in fwe_run_bin() 73 ret = fmc_write_ee(fmc, 0, (void *)fw->data, fw->size); in fwe_run_bin() 75 dev_info(&fmc->dev, "write_eeprom: error %i\n", ret); in fwe_run_bin() [all …]
|
D | fmc-debug.c | 41 static void fmc_sdb_dump_recursive(struct fmc_device *fmc, struct seq_file *s, in fmc_sdb_dump_recursive() argument 85 fmc_sdb_dump_recursive(fmc, s, arr->subtree[i]); in fmc_sdb_dump_recursive() 119 struct fmc_device *fmc = s->private; in fmc_sdb_dump() local 121 if (!fmc->sdb) { in fmc_sdb_dump() 126 seq_printf(s, "FMC: %s (%s), slot %i, device %s\n", dev_name(fmc->hwdev), in fmc_sdb_dump() 127 fmc->carrier_name, fmc->slot_id, dev_name(&fmc->dev)); in fmc_sdb_dump() 129 fmc_sdb_dump_recursive(fmc, s, fmc->sdb); in fmc_sdb_dump() 137 struct fmc_device *fmc = inode->i_private; in fmc_sdb_dump_open() local 139 return single_open(file, fmc_sdb_dump, fmc); in fmc_sdb_dump_open() 151 int fmc_debug_init(struct fmc_device *fmc) in fmc_debug_init() argument [all …]
|
D | fmc-sdb.c | 18 static uint32_t __sdb_rd(struct fmc_device *fmc, unsigned long address, in __sdb_rd() argument 21 uint32_t res = fmc_readl(fmc, address); in __sdb_rd() 27 static struct sdb_array *__fmc_scan_sdb_tree(struct fmc_device *fmc, in __fmc_scan_sdb_tree() argument 35 onew = fmc_readl(fmc, sdb_addr); in __fmc_scan_sdb_tree() 46 onew = __sdb_rd(fmc, sdb_addr + 4, convert); in __fmc_scan_sdb_tree() 62 arr->fmc = fmc; in __fmc_scan_sdb_tree() 68 __sdb_rd(fmc, sdb_addr + (i * 64) + j, convert); in __fmc_scan_sdb_tree() 79 sub = __fmc_scan_sdb_tree(fmc, subaddr, newbase, in __fmc_scan_sdb_tree() 91 int fmc_scan_sdb_tree(struct fmc_device *fmc, unsigned long address) in fmc_scan_sdb_tree() argument 94 if (fmc->sdb) in fmc_scan_sdb_tree() [all …]
|
D | fmc-trivial.c | 25 struct fmc_device *fmc = dev_id; in t_handler() local 27 fmc_irq_ack(fmc); in t_handler() 28 dev_info(&fmc->dev, "received irq %i\n", irq); in t_handler() 44 static int t_probe(struct fmc_device *fmc) in t_probe() argument 49 index = fmc_validate(fmc, &t_drv); in t_probe() 53 ret = fmc_irq_request(fmc, t_handler, "fmc-trivial", IRQF_SHARED); in t_probe() 57 fmc_gpio_config(fmc, t_gpio, ARRAY_SIZE(t_gpio)); in t_probe() 59 ret = fmc_reprogram(fmc, &t_drv, "", 0); in t_probe() 63 fmc_irq_free(fmc); in t_probe() 69 static int t_remove(struct fmc_device *fmc) in t_remove() argument [all …]
|
D | fmc-dump.c | 42 void fmc_dump_eeprom(const struct fmc_device *fmc) in fmc_dump_eeprom() argument 50 pr_info("FMC: %s (%s), slot %i, device %s\n", dev_name(fmc->hwdev), in fmc_dump_eeprom() 51 fmc->carrier_name, fmc->slot_id, dev_name(&fmc->dev)); in fmc_dump_eeprom() 52 pr_info("FMC: dumping eeprom 0x%x (%i) bytes\n", fmc->eeprom_len, in fmc_dump_eeprom() 53 fmc->eeprom_len); in fmc_dump_eeprom() 55 line = fmc->eeprom; in fmc_dump_eeprom() 57 for (i = 0; i < fmc->eeprom_len; i += LINELEN, line += LINELEN) in fmc_dump_eeprom()
|
D | fmc-private.h | 8 extern int fmc_debug_init(struct fmc_device *fmc); 9 extern void fmc_debug_exit(struct fmc_device *fmc);
|
/Linux-v4.19/include/linux/ |
D | fmc.h | 132 uint32_t (*read32)(struct fmc_device *fmc, int offset); 133 void (*write32)(struct fmc_device *fmc, uint32_t value, int offset); 134 int (*validate)(struct fmc_device *fmc, struct fmc_driver *drv); 138 int (*irq_request)(struct fmc_device *fmc, irq_handler_t h, 140 void (*irq_ack)(struct fmc_device *fmc); 141 int (*irq_free)(struct fmc_device *fmc); 142 int (*gpio_config)(struct fmc_device *fmc, struct fmc_gpio *gpio, 144 int (*read_ee)(struct fmc_device *fmc, int pos, void *d, int l); 145 int (*write_ee)(struct fmc_device *fmc, int pos, const void *d, int l); 149 int fmc_reprogram_raw(struct fmc_device *fmc, struct fmc_driver *d, [all …]
|
D | fmc-sdb.h | 29 struct fmc_device *fmc; /* the device that hosts it */ member 35 extern int fmc_scan_sdb_tree(struct fmc_device *fmc, unsigned long address); 36 extern void fmc_show_sdb_tree(const struct fmc_device *fmc); 39 extern int fmc_free_sdb_tree(struct fmc_device *fmc);
|
/Linux-v4.19/Documentation/fmc/ |
D | 00-INDEX | 3 wrote for the externally-developed fmc-bus package. The complete 5 http://www.ohwr.org/projects/fmc-bus/files 28 fmc-fakedev.txt 29 - about drivers/fmc/fmc-fakedev.ko 31 fmc-trivial.txt 32 - about drivers/fmc/fmc-trivial.ko 34 fmc-write-eeprom.txt 35 - about drivers/fmc/fmc-write-eeprom.ko 37 fmc-chardev.txt 38 - about drivers/fmc/fmc-chardev.ko
|
D | fmc-chardev.txt | 1 fmc-chardev 9 the name can be a silly fmc-0000 look-alike if the device has no 10 identifiers nor bus_id, a more specific fmc-0400 if the device has a 30 default name is fmc-<bus><devfn>, and there are two cards in the system: 32 spusa.root# insmod fmc-chardev.ko 34 [ 1073.345051] spec 0000:02:00.0: Created misc device "fmc-0200" 36 [ 1073.356525] spec 0000:04:00.0: Created misc device "fmc-0400" 37 spusa.root# ls -l /dev/fmc* 38 crw------- 1 root root 10, 58 Nov 20 19:23 /dev/fmc-0200 39 crw------- 1 root root 10, 57 Nov 20 19:23 /dev/fmc-0400 [all …]
|
D | fmc-fakedev.txt | 1 fmc-fakedev 4 This package includes a software-only device, called fmc-fakedev, which 21 spusa.root# insmod fmc-fakedev.ko 22 [ 99.971247] fake-fmc-carrier: mezzanine 0 25 spusa.root# rmmod fmc-fakedev 26 spusa.root# insmod fmc-fakedev.ko eeprom=fdelay-eeprom.bin 27 [ 121.447464] fake-fmc-carrier: Mezzanine 0: eeprom "fdelay-eeprom.bin" 28 [ 121.462725] fake-fmc-carrier: mezzanine 0 31 spusa.root# rmmod fmc-fakedev 36 This is shown in fmc-write-eeprom.txt
|
D | fmc-write-eeprom.txt | 1 fmc-write-eeprom 48 spusa.root# insmod /tmp/fmc-write-eeprom.ko busid=0x0200 file=try.tlv 58 fmc-fakedev.ko module (see *note fmc-fakedev::). Whenever you change 60 after two seconds. Please note, however, that if fmc-write-eeprom is 66 spusa.root# insmod fmc-fakedev.ko 67 [ 72.984733] fake-fmc: Manufacturer: fake-vendor 68 [ 72.989434] fake-fmc: Product name: fake-design-for-testing 69 spusa.root# insmod fmc-write-eeprom.ko busid=0 file=fdelay-eeprom.bin; \ 70 rmmod fmc-write-eeprom 71 [ 130.874098] fake-fmc: Matching a generic driver (no ID) [all …]
|
D | API.txt | 1 Functions Exported by fmc.ko 9 int fmc_device_register(struct fmc_device *fmc); 10 void fmc_device_unregister(struct fmc_device *fmc); 12 int fmc_device_register_n(struct fmc_device **fmc, int n); 13 void fmc_device_unregister_n(struct fmc_device **fmc, int n); 15 uint32_t fmc_readl(struct fmc_device *fmc, int offset); 16 void fmc_writel(struct fmc_device *fmc, uint32_t val, int off); 17 void *fmc_get_drvdata(struct fmc_device *fmc); 18 void fmc_set_drvdata(struct fmc_device *fmc, void *data); 27 The fmc-bus itself takes care of releasing the structure when their use
|
D | FMC-and-SDB.txt | 21 git://ohwr.org/fmc-projects/fmc-bus.git (read-only) 22 git@ohwr.org:fmc-projects/fmc-bus.git (read-write for developers) 26 project: `http://www.ohwr.org/projects/fmc-bus/files' 75 The fmc.ko bus driver exports a few functions to help drivers taking 80 <linux/fmc-sdb.h>. The linux/ prefix in the name is there because we 84 int fmc_scan_sdb_tree(struct fmc_device *fmc, unsigned long address); 85 void fmc_show_sdb_tree(struct fmc_device *fmc); 88 int fmc_free_sdb_tree(struct fmc_device *fmc);
|
D | carrier.txt | 26 change in layout of some fmc data structures). Device writers should 53 char *mezzanine_name; /* Defaults to ``fmc'' */ 115 * mezzanine_name: filled by fmc-bus during identification. 123 the fmc-bus environment, and is a good reference to look at. 135 uint32_t (*readl)(struct fmc_device *fmc, int offset); 136 void (*writel)(struct fmc_device *fmc, uint32_t value, int offset); 138 int (*validate)(struct fmc_device *fmc, struct fmc_driver *drv); 139 int (*irq_request)(struct fmc_device *fmc, irq_handler_t h, 141 void (*irq_ack)(struct fmc_device *fmc); 142 int (*irq_free)(struct fmc_device *fmc); [all …]
|
D | fmc-trivial.txt | 1 fmc-trivial 4 The simple module fmc-trivial is just a simple client that registers an
|
D | parameters.txt | 1 Module Parameters in fmc.ko 6 /sys/module/fmc/parameters/, because they are used when client drivers 7 are devices are registered, not when fmc.ko is loaded.
|
D | mezzanine.txt | 29 the `fmc.h' file - we hope other users will exploit our framework with 72 A better reference, with full explanation, is the <linux/fmc.h> header. 109 Note: the parameter is being obsoleted, because fmc.ko itself now 118 insmod fmc-trivial.ko \ 120 gateware=fmc/fine-delay.bin,fmc/simple-dio.bin
|
/Linux-v4.19/Documentation/devicetree/bindings/mtd/ |
D | aspeed-smc.txt | 13 "aspeed,ast2400-fmc" for the AST2400 Firmware Memory Controller 15 "aspeed,ast2500-fmc" for the AST2500 Firmware Memory Controller 36 fmc: fmc@1e620000 { 37 compatible = "aspeed,ast2500-fmc";
|
D | hisilicon,fmc-spi-nor.txt | 4 - compatible : Should be "hisilicon,fmc-spi-nor" and one of the following strings: 14 compatible = "hisilicon,hi3519-spi-nor", "hisilicon,fmc-spi-nor";
|