Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: misc-devices/c2port.txt: convert to ReST format

- Use copyright symbol;
- use title markups;
- adjust indentation;
- mark literal blocks as such.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
[jc: reverted |copy| change]
Link: https://lore.kernel.org/r/b3b2f3f58a9a33f9e8526d4fa36bee305ea4da38.1592203650.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
433b1b0d 16a60665

+31 -26
+30 -26
Documentation/misc-devices/c2port.txt Documentation/misc-devices/c2port.rst
··· 1 - C2 port support 2 - --------------- 1 + .. SPDX-License-Identifier: GPL-2.0 2 + .. include:: <isonum.txt> 3 + 4 + =============== 5 + C2 port support 6 + =============== 3 7 4 8 (C) Copyright 2007 Rodolfo Giometti <giometti@enneenne.com> 5 9 ··· 36 32 Silicon Laboratories site], see: 37 33 38 34 - AN127: FLASH Programming via the C2 Interface at 39 - https://www.silabs.com/Support Documents/TechnicalDocs/an127.pdf 35 + https://www.silabs.com/Support Documents/TechnicalDocs/an127.pdf 40 36 41 37 - C2 Specification at 42 - https://www.silabs.com/pages/DownloadDoc.aspx?FILEURL=Support%20Documents/TechnicalDocs/an127.pdf&src=SearchResults 38 + https://www.silabs.com/pages/DownloadDoc.aspx?FILEURL=Support%20Documents/TechnicalDocs/an127.pdf&src=SearchResults 43 39 44 40 however it implements a two wire serial communication protocol (bit 45 41 banging) designed to enable in-system programming, debugging, and ··· 51 47 ---------------- 52 48 53 49 Once the driver is loaded you can use sysfs support to get C2port's 54 - info or read/write in-system flash. 50 + info or read/write in-system flash:: 55 51 56 - # ls /sys/class/c2port/c2port0/ 57 - access flash_block_size flash_erase rev_id 58 - dev_id flash_blocks_num flash_size subsystem/ 59 - flash_access flash_data reset uevent 52 + # ls /sys/class/c2port/c2port0/ 53 + access flash_block_size flash_erase rev_id 54 + dev_id flash_blocks_num flash_size subsystem/ 55 + flash_access flash_data reset uevent 60 56 61 57 Initially the C2port access is disabled since you hardware may have 62 58 such lines multiplexed with other devices so, to get access to the 63 - C2port, you need the command: 59 + C2port, you need the command:: 64 60 65 - # echo 1 > /sys/class/c2port/c2port0/access 61 + # echo 1 > /sys/class/c2port/c2port0/access 66 62 67 63 after that you should read the device ID and revision ID of the 68 - connected micro controller: 64 + connected micro controller:: 69 65 70 - # cat /sys/class/c2port/c2port0/dev_id 71 - 8 72 - # cat /sys/class/c2port/c2port0/rev_id 73 - 1 66 + # cat /sys/class/c2port/c2port0/dev_id 67 + 8 68 + # cat /sys/class/c2port/c2port0/rev_id 69 + 1 74 70 75 71 However, for security reasons, the in-system flash access in not 76 - enabled yet, to do so you need the command: 72 + enabled yet, to do so you need the command:: 77 73 78 - # echo 1 > /sys/class/c2port/c2port0/flash_access 74 + # echo 1 > /sys/class/c2port/c2port0/flash_access 79 75 80 - After that you can read the whole flash: 76 + After that you can read the whole flash:: 81 77 82 - # cat /sys/class/c2port/c2port0/flash_data > image 78 + # cat /sys/class/c2port/c2port0/flash_data > image 83 79 84 - erase it: 80 + erase it:: 85 81 86 - # echo 1 > /sys/class/c2port/c2port0/flash_erase 82 + # echo 1 > /sys/class/c2port/c2port0/flash_erase 87 83 88 - and write it: 84 + and write it:: 89 85 90 - # cat image > /sys/class/c2port/c2port0/flash_data 86 + # cat image > /sys/class/c2port/c2port0/flash_data 91 87 92 - after writing you have to reset the device to execute the new code: 88 + after writing you have to reset the device to execute the new code:: 93 89 94 - # echo 1 > /sys/class/c2port/c2port0/reset 90 + # echo 1 > /sys/class/c2port/c2port0/reset
+1
Documentation/misc-devices/index.rst
··· 16 16 17 17 ad525x_dpot 18 18 eeprom 19 + c2port 19 20 ibmvmc 20 21 ics932s401 21 22 isl29003