stm32: f4: Add FLASH_OPTCR1 definition

This is required for stm32f42xx and stm32f43xx with second bank options.
[ETH] Phy ID configurable as parameter
[ETH] Make support of ethernet for F1 family
[fix] after phyid addition, the init function should init correct phy.
ethernet: mac stm32fxx7: Fix style and docs

Rushed commits are bad mkay :)
[STM32F0] add support of autotrimming HSI to USB SOF frames

Signed-off-by: Frantisek Burian <BuFran@seznam.cz>
[STM32F0] Add support functions for USB clock setup in F072 chips.

There is remaining an issue with PREDIV connected just after clock multiplexer (only F072). This should be fixed in another commit.
usb: Prevent memcpy() being called with NULL arguments

If there is no additional iface data then iface->extra is NULL and
iface->extralen is zero. Passing NULL to memcpy is undefined behaviour
even if the length of data to copy is zero. In other words a conforming
(debug) memcpy implementation is permitted to assert(dst && src) without
checking the value of n.

Add an extra branch to avoid this.
usb: Support for class specific endpoint descriptors.

Extends struct usb_endpoint_descriptor to make it possible to provide
the USB host with class-specific extensions to endpoint descriptors.

The approach taken, based on extra and extralen and removing the sizeof()
from USB_DT_ENDPOINT_SIZE, is identical to the approach used to add
class-specific extensions to interface descriptors. All libopencm3-examples
use the USB_DT_ENDPOINT_SIZE (rather than directly using sizeof) so there
should be no compatibility problems resulting from this change.
usb: Support for MIDI class devices

Provides all of the config descriptors for MIDI class devices together
with a sub-set of the audio class sufficient to put together a full
fledged MIDI device.
First cut at an HSI configuration API for rcc on the STMF4 series.

Fixed constant usage, and a AHB frequency computation.

And including an F0 rework of RCC a bit to put the rcc_set_hsi_clock code in
the F0 tree as well, tested on the Nucleo F030RE.

Further generalizing the clock setup to work for HSE and HSI clocks

Conflicts:
	include/libopencm3/stm32/f0/rcc.h
	lib/stm32/f0/rcc.c
F0 code update

Deprecates some functions. Unify around rcc_pll_clock_setup()

Conflicts:
	include/libopencm3/stm32/f0/rcc.h
	lib/stm32/f0/rcc.c
This commit adds changes to the l0 rcc system to be closer to the final
version.
Fixed use of bare constants per BuFran's comments