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>
This commit is contained in:
Mauro Carvalho Chehab 2020-06-15 08:50:15 +02:00 committed by Jonathan Corbet
parent 16a60665cf
commit 433b1b0d75
2 changed files with 31 additions and 26 deletions

View File

@ -1,5 +1,9 @@
.. SPDX-License-Identifier: GPL-2.0
.. include:: <isonum.txt>
===============
C2 port support
---------------
===============
(C) Copyright 2007 Rodolfo Giometti <giometti@enneenne.com>
@ -47,7 +51,7 @@ Using the driver
----------------
Once the driver is loaded you can use sysfs support to get C2port's
info or read/write in-system flash.
info or read/write in-system flash::
# ls /sys/class/c2port/c2port0/
access flash_block_size flash_erase rev_id
@ -56,12 +60,12 @@ flash_access flash_data reset uevent
Initially the C2port access is disabled since you hardware may have
such lines multiplexed with other devices so, to get access to the
C2port, you need the command:
C2port, you need the command::
# echo 1 > /sys/class/c2port/c2port0/access
after that you should read the device ID and revision ID of the
connected micro controller:
connected micro controller::
# cat /sys/class/c2port/c2port0/dev_id
8
@ -69,22 +73,22 @@ connected micro controller:
1
However, for security reasons, the in-system flash access in not
enabled yet, to do so you need the command:
enabled yet, to do so you need the command::
# echo 1 > /sys/class/c2port/c2port0/flash_access
After that you can read the whole flash:
After that you can read the whole flash::
# cat /sys/class/c2port/c2port0/flash_data > image
erase it:
erase it::
# echo 1 > /sys/class/c2port/c2port0/flash_erase
and write it:
and write it::
# cat image > /sys/class/c2port/c2port0/flash_data
after writing you have to reset the device to execute the new code:
after writing you have to reset the device to execute the new code::
# echo 1 > /sys/class/c2port/c2port0/reset

View File

@ -16,6 +16,7 @@ fit into other categories.
ad525x_dpot
eeprom
c2port
ibmvmc
ics932s401
isl29003